Questions tagged as 'java'

1
answer

Show string string typed

How to display values read inside a loop in Java? Ex: for(int i = 1; i <= 2; i++){ System.out.print("Nome: "); String nome = tecla.nextLine(); } ?? < - Make read names appear here     
asked by 15.02.2017 / 20:16
2
answers

Returning an object. Any code smell here?

I thought of the following public method: public RespostaDeArme armar(); The class RespostaDeArme would look like this: public class RespostaDeArme { private final ResultadoDeArme resultado; private final Set<Integer>...
asked by 16.02.2017 / 19:07
1
answer

Lock Prints [closed]

The program should: receive a 4-digit number, Increasing sorting and saving, Sorting in descending order and saving. Subtract from ascending to descending and save so that you can run the process from scratch until the subtraction equa...
asked by 20.11.2016 / 15:33
3
answers

How to validate a field of type double?

Good afternoon guys, I'm not able to validate the value field of type double The field that I can not validate for the cadaster is the valor field. Follow the class method to validate the data to register: public boolean v...
asked by 23.01.2017 / 16:14
2
answers

IReport Tibco - Error processing XML: no element found

Hello! This is the following I'm having trouble generating the report, I'm using jsf, hibernate, mysql Follow my bean. @Named @RequestScoped public class RelatorioBean implements Serializable { private static final long serialVersi...
asked by 04.11.2016 / 14:49
1
answer

Method call inside the JSP

Good morning everyone! I was having trouble formatting dates in jsp, but with the help of friends here, I managed to resolve. The problem is that I think my code is far from the good practices in JSP, I had to program it inside the page, but...
asked by 23.01.2017 / 12:12
1
answer

NullPointerException: Attempt to invoke virtual method

I'm trying to pass information from one Activity to another through the position in the list, but it's giving this nullpointer error. Where do I get the information - Main Activity @Override protected void onListItemClick(Li...
asked by 03.11.2016 / 22:27
1
answer

Capture webcam images every 1 second using JavaCV

A particular programmer is doing a project where the default webcam takes pictures every 1 second using JavaCV. For now, in this code, at the click of the capture button it captures a photo and saves it in the program folder. It asks the prog...
asked by 04.11.2016 / 13:47
1
answer

Access modifier for methods in Java - Default

I just did a test and I found a suspicious question, I would like your opinion.    In the Java programming language, when the method of a class   does not have an explicitly declared access modifier   means that this method can be accessed...
asked by 06.03.2017 / 00:55
2
answers

String_diff () method in JAVA

In PHP there is the array_diff() method that checks values of two arrays and returns the items for the difference between them. For example: $arrExclusion = array('as', 'coisas', 'acontece', 'no', 'tempo', 'certo'); $arr = array('tud...
asked by 06.03.2017 / 02:08