Questions tagged as 'java'

1
answer

Do While is not working correctly

Do while is not working in code. At first the test that I am doing now is just the first one on the menu (register the user) and then I should go back to the menu until I type S. (It is only running once) Another question is how to register in a...
asked by 25.10.2017 / 20:12
1
answer

Catch latest information sql server by netbeans jdbc

I am using this way to try to bring the latest information registered in the sql server, but for some unknown reason it is not working. I searched in several forums and apparently the same method I'm using is used: Class.forName(Auxili...
asked by 01.11.2017 / 12:22
1
answer

How to convert Scanner to double in java?

I am developing a software, in which at one point the system should get a value informed by the user using the class Scanner and insert it into an array and then return an array with the values entered by the user, but I can not do Scanner conve...
asked by 28.04.2018 / 00:24
1
answer

Java Error NullPointerException in construction

main.java package projeto; import java.sql.*; import javax.swing.JOptionPane; import java.sql.Connection; import java.sql.Statement; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql....
asked by 20.05.2018 / 22:27
2
answers

How to use the same Drawer Navigation menu in various Activities without repeating code?

How to use the same drawer Navigation menu on several activitys without repeating code?     
asked by 02.07.2018 / 18:00
2
answers

What is the fastest way? [closed]

I made a game in Java and the data of the players are in the database, when a player enters, it is placed in a ArrayList<PlayerData> where it contains the getters and setters
asked by 25.08.2018 / 23:19
1
answer

Search the database

I am in doubt as to how to do a search in DB. He's going to catch. Does anyone know why? And how to solve it? This is the function public void consultar(){ String sql ="select * from tbaluno where idaluno=?"; try { Prepared...
asked by 18.04.2018 / 04:42
2
answers

Bad Operand types for binary operator

I have to do an exercise for the sales-related faculty and in the client class I need to apply a + do aCommerce method. Detail, I have done so far only part "a", put everything in case it helps in solving the problem. code in the Client cl...
asked by 13.04.2014 / 17:21
1
answer

"If item" tal "is selected from spinner1, then item" tal2 "from spinner2 is selected" how to do an if there?

public void Spinner1() { Spinner spinner1 = (Spinner) findViewById(R.id.spinner1); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.curso_array, android.R.layout.simple_spinner_item); adapter.se...
asked by 29.03.2014 / 23:30
2
answers

Questions about NDK

I'm studying Android programming in Java, and what worries me is that I'll only be able to get a share of the job market because there are IOS and Windows Phone phones that do not use the Java Language, I've heard of a Java tool called NDK (Nati...
asked by 10.08.2014 / 13:36