NullPointerException for my for loop? java -


 public static double[] returnarray()  {    (int a=0; a<31; a++) {      double = double.valueof(days[a]);       dataarray[a]=i;    }        return(dataarray);     } 

days[] array of string , static double[] dataarray declared

and says got nullpointerexception @ double = double.valueof(days[a]);? please help,

check there values in days[a] before

double = double.valueof(days[a]); 

my suspicion days days[30] might have no value inside sometimes.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -