What is the result? Given: What is the result? Given: What is the result? A. 5 : 5 B. 6 : 4 C. 6 : 5 D. 5 : 4 Show Hint ← Previous question Next question →
renko Answer A: Code question: public class TestLoop { public static void main(String[] args) { int a = 0, z=10; while (a < z) { a++; –z; } System.out.print(a + " : " + z); } } Output: 5 : 5 Reply
Answer A:
Code question:
public class TestLoop {
public static void main(String[] args) {
int a = 0, z=10;
while (a < z) {
a++;
–z;
}
System.out.print(a + " : " + z);
}
}
Output:
5 : 5