Vidyalelo
Java Programming · Q11

Flow Control

Programming · Java Programming · question 11

Q11

What is the output of the following code snippet?int j = 0;while (j < 5) System.out.print(j + " "); j += 2;

A.
5 4 3 2 1
B.
2 4 6 8 10
C.
0 2 4
Answer
D.
0 1 2 3 4

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board