Questions tagged as 'nullpointerexception'

2
answers

NullPointerException error, where is the error?

I wanted to know where the error is. I read that the NullPointerException error is when we try to access a variable that was not initialized, I just did not find this error in my code. import java.sql.Connection; import java.sql.DriverM...
asked by 29.07.2016 / 21:45
3
answers

NullReferenceException error in join

I created a join in LINQ to create a List : (from p in listaProcedimento join pd in oListaprocedimentodetalhe on p.codigo equals pd.codigoProcedimento into pd1 from pd2 in pd1.DefaultIfEmpty() select new ProcedimentoDe...
asked by 02.08.2017 / 13:42
2
answers

Android application = Unfortunately project has stopped

I'm studying Android and I want to make a simple parameter pass for another Activity but the application is terminated in the emulator and the logCat shows a NullPointerException, can anyone help me? Class: public class MainActivity extends...
asked by 16.06.2015 / 14:48
2
answers

NullPointerException error using Boolean type

I'm having problems again with this project, the application runs normally opens the screen for registration and everything else, but when you click the button to save it simply closes the app, but in the console of the firebase is registered th...
asked by 23.10.2016 / 17:58
2
answers

How do I check if a String is null and add to an array?

I have a problem, I have several variables (String) with the following names: texttransfer1, texttransfer2 to 73 (texttransfer73). At times the variable textTransfer2 for example may assume an empty value or not, depending on the situation....
asked by 01.06.2017 / 02:34
2
answers

NullPointerException while getting latitude and longitude

I'm developing a mobile app with Android Studio that aims to get the latitude and longitude information and use the Google Geocoder service to return the address of the geographic position. However, I am not able to capture the latitude and long...
asked by 15.12.2017 / 15:03
2
answers

NullPointerException error in execution

Hello. Again I'm getting NullPointerException error. I can not figure out why. The Activity is as follows:    Create a Java application to control the weekly menu of patients in a Nutrition Clinic. You should consider creating two classes,...
asked by 09.04.2018 / 19:37
1
answer

How to declare and instantiate a Double vector?

I'm trying to fill a vector of Double with 1's, but I'm not sure how to declare and instantiate the variable. double betaParcial[] = null; // 'linha' seria o tamanho do vetor, e pode assumir qualquer numero (ex.: 3 ou 4) for(int i=0 ; i<li...
asked by 01.10.2017 / 19:04
1
answer

Exception in thread "main" java.lang.NullPointerException

How do I resolve this error?    Java - Exception in thread "main" java.lang.NullPointerException at Client.ClientClient (Client.java:43) at Operacoes.main (Operations.java:9) Follow my code: import javax.swing.JOptionPane; public clas...
asked by 01.02.2015 / 16:40
2
answers

NullPointerException when creating a View on Android

I'm creating a Activity on Android, whose code is here , and I'm getting a NullPointerException near the line final TextView txtResult = new TextView(this); I got the following stack dump: 05-07 09:12:57.180: E/AndroidRunti...
asked by 07.05.2014 / 15:44