posted 22 years ago
So what's the deal ??
output is
3 0
3 1
3 2
which is perfectly normal
the initialization part is
i++, j=(long)0
i's value is now 3 and j's 0
the condition part is j<3 which means that the loop will iterate three times (j=0,j=1,j=2)
the update part is
System.out.println(""+i +" "+j++)
which prints i's and j's values, the value of i is always 3 and the value of j is increment from 0 to 2...
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform