Page 1 of 1

About Question com.enthuware.ets.scjp.v5.2.150

Posted: Tue Nov 23, 2010 10:45 am
by ETS User
What will the following code print?

void crazyLoop()
{
int c = 0;
JACK: while (c < 8)
{
JILL: System.out.println(c);
if (c > 3) break JACK; else c++;
}
}

Re: About Question com.enthuware.ets.scjp.v5.2.150

Posted: Wed Jan 12, 2011 8:06 am
by mgs
Looks like it prints :
0
1
2
3
4
and it is ok.