Questions tagged as 'java'

1
answer

Why are the conditions not met?

When I start this program, for example I put value 11, I do not get into the conditional if ((valor >10)&&(valor <20)) , why can it be? /* * To change this license header, choose License Headers in Project Properties. *...
asked by 08.10.2016 / 08:29
1
answer

Infinite recursive function

I have an infinite recursive cycle in Java public void infiniteLoop(Long x){ System.out.println(""+x); infiniteLoop(x + 1); } public static void main(String[] args) { StackOverFlow st = new StackOverFlow(); st.infiniteLoop(...
asked by 10.04.2017 / 17:34
2
answers

Change of frame in javaFX

How can I change from one frame to another by closing the first frame in javaFX ? I have the following code, but it does not work, it does not open the other windows: Proof Windows Class: package pruebaventanas; import java.io.IOEx...
asked by 15.11.2016 / 17:50
1
answer

How to get the name of the database to which I am connected in MySQL with Java?

Hello innovative programmers, I would like to know if you can get the name of the schema or database to which I am connected when establishing the connection in MySQL with java, if you can, would you tell me how? I already tried with DataBase...
asked by 20.10.2016 / 10:50
2
answers

Consuming a JSON from android What's wrong? [closed]

I'm trying to get a Json from a web resource and convert it to string to show it on the screen. I am using android Studio for this and I can not consume that resource. Any idea that is wrong PS: In the manifests I have added the INTERNET and ACC...
asked by 18.10.2016 / 13:11
2
answers

How to return to main when there is an error?

I want that when there is an error for the introduction of user data, I will ask for the data again until they are ok. public class EntradaDeDatos { /** * @param args the command line arguments */ public static void main(Str...
asked by 11.09.2016 / 18:32
1
answer

Error copying a file in java

What I'm trying to do is copy the image inside the directory directory but when I execute the method, nothing happens but the directory becomes an arhivo that I have to do to make it work for me. public static void copyFile(String origen, Stri...
asked by 15.06.2016 / 14:56
2
answers

Is it possible to run a servlet from a Thread class?

I'm doing a web application with JSP. This application has to show the result of a query in a table. The difficulty is that this has to be shown when the application is opened (url), without pressing any button. I thought about doing a Thread th...
asked by 14.06.2016 / 22:57
1
answer

How can I create a grid in java, that allows me to auto-filter the data as in dev express?

I would like to know if there is any alternative to grid view in java, which allows me to perform several functions as auto-filters, or to customize to the maximum in a less tedious way. Thanks     
asked by 14.07.2016 / 16:47
2
answers

do the functions in JAVA menu buttons

I need to put actions to the buttons of a menu created in java with netbeans, I did it with the help that the compiler brings to make graphic menus but I do not know how to make the connection so that the buttons execute functions, if someone ex...
asked by 14.07.2016 / 02:14