Questions tagged as 'java'

4
answers

Split String using comma as parameter [duplicate]

I'm trying to get the values from a ListView to send them to another screen by clicking on the item. So I have the following code: @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) {...
asked by 29.05.2015 / 14:18
2
answers

Display date correctly in a JTable

I'm not able to display the sql database date type Date in JTable, the date appears like this: Iusethefollowingmethodtocallthetabledata:publicArrayList<Alunos>read(){PreparedStatementstmt=null;ResultSetrs=null;ArrayList<Aluno...
asked by 27.11.2018 / 20:42
1
answer

Why do these two identical codes, one in C ++ and another and Java, give different results? [closed]

I'm trying to resolve an issue in the Online Judge URI in Java however I'm remarking 5 % error, and from what I've studied is being caused by the fact that the precision of the variables in C ++ and Java is different. I've tried everything to...
asked by 05.10.2018 / 06:30
1
answer

Keyword 'final' for java variables

The final java keyword for variables means that it will only get a value once, right? If I have multiple variables in a function and I know they should not receive any value later, is it good to declare them as "final"? void foo() { final i...
asked by 05.10.2018 / 18:45
1
answer

Code does not compile with multiple errors

import java.util.Arrays; public class OrdenaArgumentos { String [] nomes = new String []{ " rafael cosentino ", " jonas hirata ", " marcelo martins "}; java.util.Arrays.sort (nomes); for ( String nome : nomes ) { System . out....
asked by 13.12.2015 / 03:55
2
answers

How do I popup a new JFrame?

How can I do when when I press a JMenuItem it shows a window where I would have to insert, for example, a date and select from a pair of checkboxes? In short, how do I popup a new JFrame ? Thanks for the help!     
asked by 13.12.2015 / 23:15
1
answer

How to get the text of a button?

So, I have a game of questions and answers. Where each question has 4 answers (placed on the button labels). How do I get the text of the button clicked to compare to a String?     
asked by 16.08.2016 / 13:46
2
answers

QuerySyntaxException: unexpected token:. near

This is the error I believe is easy for those who handle Java but as I am learning I still have not identified the problem. GRAVE: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: . nea...
asked by 03.03.2015 / 17:41
2
answers

I can not remove the title bar of the android application [duplicate]

I have tried using android:theme="@android:style/Theme.NoTitleBar" , but when I run my app it gives error.     
asked by 08.02.2015 / 04:04
1
answer

Send a servlet object array to a jsp page

I need some help I have a servlet that is returning an array object p with a select query. I would like to know how to display this object in my jsp in HTML input fields     
asked by 16.10.2018 / 03:12