Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.657 :

Posted: Sat Jun 23, 2012 9:37 pm
by ETS User
class Test
{
public static void main(String args[])
{
int i=0, j=0;
X1: for(i = 0; i < 3; i++)
{
X2: for(j = 3; j > 0; j--)
{
if(i < j) continue X1;
else break X2;
}
}
System.out.println(i+" "+j);
}

Answer is 33 not 03 as stated.please rectify

Re: About Question com.enthuware.ets.scjp.v6.2.657 :

Posted: Sun Jun 24, 2012 7:55 am
by admin
Hello,
The correct answer 3 3 is indeed displayed by the simulator as well.

HTH,
Paul.

Re: About Question com.enthuware.ets.scjp.v6.2.657 :

Posted: Thu Apr 22, 2021 12:05 pm
by atox86
YOu are right, I as getting crazy!!! Fix it!!

Re: About Question com.enthuware.ets.scjp.v6.2.657 :

Posted: Thu Apr 22, 2021 1:21 pm
by admin
Fix what??