Questions tagged as 'java'

1
answer

Unwanted Result - SQL Query

Hello. I'm a problem and I can not see a way to solve it. My data from the move table: Myquery:selectavg(m.valor)fromMovimentacaomwherem.tipo='SAIDA'groupbym.data;Myresult: I can not group the average by date (day). Even if I use d...
asked by 04.09.2018 / 02:30
2
answers

Difference between arrays in Java

What's wrong with Android not setting the size of the array? I have seen in several places that this should be started with a default value. What is the internal difference of doing this: String[] array1 = new String[99]{}; Or this S...
asked by 24.03.2018 / 17:34
2
answers

The onDataChange (), in addListenerForSingleValueEvent (), only runs after my method returns

I'm trying to check if a given email exists, with android using firebase I'm doing it this way: public boolean existeEmail(String email) { final boolean[] retorno = new boolean[1]; final DatabaseReference databaseArtists = FirebaseDat...
asked by 04.08.2018 / 16:49
2
answers

Annotation @Scheduled Spring check environment

I have a controller annotated with @Scheduled but when the test environment is active it also runs. Is it possible to check the environment in which application is running for the method to run only in production?     
asked by 11.07.2018 / 21:39
1
answer

Maven: Generate JAR with Dependencies / Directory recources

I am very lazy with Maven and because there is a lot of material on the internet I end up getting lost as I perform the operation below: I need to generate the JAR Runnable of my project with all the dependencies I have used and...
asked by 22.09.2015 / 22:30
1
answer

How do I get results from an asynchronous task on Android?

I'm trying to retrieve the value of my API using .get() but it's always falling into Exception, I believe I'm not doing it correctly. private static String APIAddress = "http://10.0.2.2/APIs/LOGINServer/server.php"; @Override p...
asked by 26.10.2014 / 02:02
2
answers

Class declaration in Java [duplicate]

Can I declare more than one class in the same file in Java, and if this is possible, is the most correct way to program in this language?     
asked by 29.04.2018 / 14:38
2
answers

Passing by object reference Wrapper for method

I've been researching about passing by reference in Java and realized that you can not directly do this. As only object references and array's can be passed by reference I thought about using the Wrapper classes to solve problems where I need to...
asked by 20.11.2015 / 01:40
2
answers

Center Swing Window

I wanted to know how to do when to call a secondary window in Swing it left centered with the main window of the program. At the moment, when I call it it appears in the upper left corner.     
asked by 23.09.2015 / 13:46
3
answers

Method return in Java

I do not know anything about Java. I would like to know how to get the return value of the dv variable that is inside the Base10() method and use it in main . Could someone help me? public class Boleto { public static void...
asked by 12.01.2018 / 17:51