What is the result?

Given:
public class MyClass {
public static void main(String[] args) {
while (int ii = 0; ii < 2) {
ii++;
System.out.println("ii = " + ii);
}
}
}
What is the result?
A. ii = 1
ii = 2
B. Compilation fails
C. The program prints nothing
D. The program goes into an infinite loop with no output
E. The program goes to an infinite loop outputting:
ii = 1
ii = 1

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.