posted 24 years ago
Hi Teja,
Lemme try to explain this...
outer: for (int i = 0; i < 2; i++) {
for (int j = 0; j < 3; j++) {
if (i == j) {
continue outer;
}
System.out.println("i = " + i + " j = " + j);
}
}
In this code, When the compiler encounters "continue outer" for the first time, would be when 1= 0 & j = 0. Then instead of continuing the the second loop the control jumps to the first loop to continue processing ... & so on
Thx
Aruna