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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
ETS User

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

Post 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++;
}
}

mgs

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

Post by mgs »

Looks like it prints :
0
1
2
3
4
and it is ok.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 34 guests