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 -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -