+ 2

What happens when running the following code? do ( System.out.println("helium"); )while (false);

A. It completes successfully without output. B. It outputs helium once. C. It keeps outputting helium. D. The code does not compile.

4th Apr 2018, 5:28 AM
Vartika Pahuja
Vartika Pahuja - avatar
3 Answers
+ 4
Unless you mistyped {} with () I guess it would be D, challenge question?
4th Apr 2018, 6:06 AM
Ipang
+ 1
in my opinion the answer is B
4th Apr 2018, 5:35 AM
Jan Baier
+ 1
I don't know java but i would assume the answer is B
4th Apr 2018, 5:36 AM
Frog
Frog - avatar