Questions tagged as 'java'

1
answer

Write a file containing the contents of an array

I have an array of char grid and I want to write a file with its contents. Here is the code I did: public static String getGrid() { String text = String.valueOf(grid); return text; } public static void Escreve() { Strin...
asked by 17.06.2017 / 23:45
1
answer

Unable to start activity ComponentInfo {}: java.lang.NullPointerException

I'm having difficulty finding the solution to this problem, in the code I want to move from the activity "MainActivity" to "PlantaList", but at the time of testing the application on the virtual machine the app closes after this action and the t...
asked by 17.06.2017 / 22:28
1
answer

Error trying to generate signed APK. What can be wrong?

<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <use...
asked by 06.06.2017 / 03:41
1
answer

Filling an object through another object

I'm trying to fill parameters of one object through another. When debugging the code it stops at that part. First line is 72. The variable pNumero takes the value of the JSP correctly. But I believe the problem is getting to the Object Add...
asked by 30.06.2017 / 19:09
1
answer

Error When uploading with Bootstrap fileinput

Well I'm having problems with this plugin I would like to know if someone has already messed with it and if it could help in the question I'm having problems communicating with the controller I'm taking the following error 405 Method Not Allo...
asked by 01.06.2017 / 16:08
1
answer

NoSuchElementException error when capturing data entry with Scanner

I'm having problems with data entries using Scanner with JOptionPane working fine. Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Unknown Source) at java.util.Scanner.next(Unknown Source) at j...
asked by 02.06.2017 / 03:03
1
answer

Changing label and color of the entries of a pie Chart - Android

I have the following code: public class PontuacaoUserActivity extends AppCompatActivity { PieChart graficoUser; int pontosCor, pontosNumero, pontosObjeto; FirebaseUser user; FirebaseAuth auth; DatabaseReference databaseRef, userDB; ArrayLi...
asked by 31.05.2017 / 18:13
1
answer

Handling dates

I have questions about the steps to manipulate dates. Are the steps below ok? Can I start my studies? I have the Date attribute and want to insert 2 days. Convert Date to String . Convert String to Calendar...
asked by 02.06.2017 / 00:17
1
answer

Permanent service in the background

How to run a permanent service in the background. For example I want my app to always run this method: public void addToCalendar(){ myDB = CustomApplication.getDatabaseHelper(); ColorDrawable blue = new ColorDrawable(Color....
asked by 12.07.2017 / 23:05
1
answer

Date formatter not working

I have a code that supposedly passes to dd-mm-yyyy or for example 02-10-2017 but my problem is that this code instead of passing 02-10-2017 is going to 2-10-2017 . Code: dt = 2 + "-" + 10 + "-" + 2017; SimpleDateF...
asked by 13.07.2017 / 22:33