Compare programs WhileExample1 and WhileExample2 - Java Quiz Question


Compare the following programs WhileExample1 and WhileExample2


A
Both WhileExample1 and WhileExample2 are the same and generate same output.
B
The last line in the output of WhileExample1 will be n = 5.
C
WhileExample2 goes into a infinite loop.
D
None of the above.