Q46
What all gets printed when the following program is compiled and run? public class Test public static void main(String args[]) int i=0, j=2; do i=++i; j--; while(j>0); System.out.println(i);
A.
0
B.
1
C.
2
AnswerD.
The program does not compile because of statement "i=++i;"
E.
None of these
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board