Multiple Choice Question

Quiz Guidelines

 

QID: 
353
Question: 

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

Select 1 option

A. It will not compile.
B. It will throw an exception at runtime.
C. It will print numbers from 0 to 8
D. It will print numbers from 0 to 3
E. It will print numbers from 0 to 4

Q&A Set: