Questions tagged as 'java'

2
answers

What are the applications of arrays in day to day? (examples of its usability)

I did an internet search on the use of arrays and I found many results aimed at creating games only ... But outside this example, where else do I use arrays in everyday (application development for example)? I have this doubt because the book...
asked by 28.10.2017 / 20:27
2
answers

Add Spinner Item [closed]

I need to use Spinner in my app ... I'm having trouble adding elements to the list. I found it very complicated. Link: link Would there be another way to simplify this? Thank you!     
asked by 10.01.2017 / 16:53
3
answers

How to make the if-else statement work for integer reading

My program compiled in cmd, but running does not execute the if statement, showing only the last String and date. I want the user to have the option to register another message. What are the possible solutions? The program is as follo...
asked by 16.09.2016 / 14:26
2
answers

How to block external requests in Jboss?

How do I block an external application from accessing my web application? Is there any way to block this?     
asked by 25.09.2015 / 19:31
1
answer

Problems with algorithm to calculate NPV and TIR

I have a logic problem to calculate the NPV and IRR. NPV formula: TIRFormula: Fromtheseformulas,Icameupwiththefollowingmethod:publicdouble[]calcularVPLTIR(){if(fluxosProducao==null)fluxosProducao=fluxoCaixaProducaoDAO.listar(cenario.getId...
asked by 14.11.2015 / 21:07
4
answers

Break an integer into small parts in Java

I need to put each digit of an integer in a position of a vector. int a = 123; List<Integer> numerosGerados = new ArrayList<>(); And now I need to put the number 1 in position 0 of the array , the number 2 in the 1, and so on....
asked by 05.03.2015 / 22:12
2
answers

How long does an x ++ increment take? [closed]

How long on average an increment of type i ++ takes to be done. Given the answers and comments placed here: I asked this question because I have a method to send emails when certain condition is reached. I can not use something like Th...
asked by 12.11.2015 / 17:34
1
answer

Java: Problems using lambda expressions in a generic type listing method

The problem would be that I can not multiply the variables that return from the listing using lambda (e * e), so it asks to create a listing method using object, but to using generics. Thanks for any input. public Element<T> listing() {...
asked by 23.06.2018 / 15:57
2
answers

How to do single registration query

I have a JSP that on the same screen I make a query record. When I open the screen I basically have the fields for the registration to below a grid with the listing of the bank, so far so good, working. As soon as I open the screen, the bank dat...
asked by 18.08.2017 / 14:45
3
answers

I made a SplashScreen it loads and will not go to the first activity what should I do? [closed]

What should I do? intro.javapublicclassintroextendsAppCompatActivity{protectedstaticfinalintTIMER_RUNTIME=5000;protectedbooleanmbActive;protectedProgressBarmProgressBar;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(...
asked by 27.09.2016 / 19:09