Questions tagged as 'java'

1
answer

I can not compile my program because, I have an error that says "NullPointerException" [duplicate]

I'm trying to build a Java project based on the concepts of object-oriented programming. However the compiler (ECLIPSE) has an error in the line of my liigar function. It says it has a NullPointerException error. Searching the internet I sa...
asked by 29.09.2018 / 18:07
1
answer

search for depth and width using graphs [closed]

I need a code that does a search in width and depth using graphs for the shortest path search, analyzing these aspects mentioned, but I do not know where to start, I would like someone to help me, Github serves also if someone know it.     
asked by 13.02.2016 / 19:48
2
answers

Update serial ID when a table is NULL

I'm doing a desktop program in java, with the ID of a product being incremented automatically by SERIAL. However, when I delete some element or all, the value of the sequence remains the last one that was added on, and I have to go there in t...
asked by 25.01.2016 / 13:43
2
answers

String Statement

I'm declaring a variable like this: private String[,] soloMarciano; Can you do this in Java? Well, I need to read two X and Y positions.     
asked by 08.01.2016 / 21:40
2
answers

How to format integer in currency with javascript? [duplicate]

Example   var number = 3500;   I want you to return 3,500     
asked by 08.09.2015 / 16:00
3
answers

Fragment error "Unable to start activity"

My application error when opening on a tablet and I can not identify the error it informs that I have to enable:    Unable to start activity   ComponentInfo {com.example.everton.horoscope / com.example.everton.horoscopo.MainActivity}:   andro...
asked by 09.10.2016 / 22:57
1
answer

Access to variables in another class [closed]

I have to do a project for college and in it I have a menu of settings, which is in a class separated from the main one, but when I try to "save" such configurations the main class does not see the change and gets the original value . I tried to...
asked by 20.10.2016 / 18:20
1
answer

Save user input in a loop [closed]

I want to get the list of the variable numeros , generated by the following loop: Scanner kb = new Scanner (System.in); double [] numeros= new double[10]; for (int i = 0; i < numeros.length; i++) { System.out.println("o proximo nu...
asked by 23.09.2016 / 14:09
1
answer

How do I get the Calendar date on Android?

I have this within onCreate : final DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {...
asked by 22.08.2017 / 21:44
1
answer

Which Java library that returns the language of the computer? [closed]

package horadosistema; import java.util.Date; public class HoraDoSistema { public static void main(String[] args) { Date relogio = new Date(); System.out.println("A hora do sistema é"); System.out.println(relogio.toString());...
asked by 27.08.2017 / 21:55