Originally posted by Deepali Pate:
I am not sure but i guess u dint get my problem clearly. If ur explaination is true i agree a[0] will be null. But what abt a[1],a[2],a[3] and a[4]. Should they not be blank stings?
The o/p i am getting is
First:null
First:null
First:null
First:null
First:null
Second:
Second:
Second:
Second:
Second:
How???
I think, Val was correct.
here,
a[i++]=""
and then you are printing a[i].
Suppose,in the first iteration
you are assigning a[0] = "" and i will be incremented and but, you are prining a[1]. which is already null due to the
String a [] = new String [5];
then in next iteration, a1[] = "" and but, you are printing a[2].
HTH,
Am I correct Val??
murthy
[ June 19, 2002: Message edited by: Jessica Sant ]