Vidyalelo
Java Programming · Q8

Flow Control

Programming · Java Programming · question 8

Q8

What is the result of the following code snippet?int i = 1;while (i <= 5) System.out.print(i + " "); i++;

A.
5 4 3 2
B.
5 4 3 2 1
C.
1 2 3 4
D.
1 2 3 4 5
Answer

Answer: Option D

Solution

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