I've taken this excerpt from the OCA Programmer Assessment test. I have changed the code slightly a little.
public class FeedingSchedule {
public static void main(String[] args) {
int x=5, j=0;
OUTER: for(int i=0; i<3; )
INNER: do {
i++; x++;
if(x>10) continue INNER;
x+=4;
j++;
} while(j<=2);
System.out.println(x);
}
}
can someone tell me why this returns -2147483639? my initial assumption was that the code should run forever and not quit.
Any replies as to the explanation of the code will be greatly appreciated.
Thanks