What is the result?

Given:
public class TestLoop1 {
public static void main(String[] args) {
int a = 0, z=10;
while (a < z) { a++;
--z;
}
System.out.print(a + " : " + z);
}
}
What is the result?
A. 5 : 5
B. 6 : 4
C. 6 : 5
D. 5 : 4

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.