Question 17 / 297:  What is the result of compiling and running the following code?
public class LoopTest {

public static void main(String args[]) {

int a = 5;

outside: for (int i = 1; i < 3; i++) {

inside: for (int j = 1; j < 3; j++) {

System.out.print(j);

if (a++ > 6)

continue inside;

break outside;

}

}

}

}

A  Compile error
B  Runtime exception is thrown
C  1
D  123
<< First < Previous Next > Last >>
Exam Home Page
Ask
Jemekia Weeden
Start Quiz
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/java-certification-questions" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>