sorry to post a stupid question. i think my error is very simple but i can't see it by my own
here is my code, i create an array containing strings called myArray.
and then i fill it with my iterator it.
i have this error :
do you know why ? is there a problem with the way i declare my array ?
Best regards X-),
Elise
Code:
<%Iterator it = myListCurCached.iterator();
int i=0;
String[] myArray;
while (it.hasNext())
{
myArray[i] = it.next().toString();
i++;
}%>
<%= myArray[3] %>
here is my code, i create an array containing strings called myArray.
and then i fill it with my iterator it.
i have this error :
Code:
97: Variable myArray may not have been initialized. myArray[i] = it3.next().toString();
do you know why ? is there a problem with the way i declare my array ?
Best regards X-),
Elise