Predict the output int a=0; if(a) System.out.println( "Hello"); else System.out.println( "Hai");
Answer options
A
Hello
B
Compilation Fails
C
Need to include the braces { } for the code to work
D
Hai
Correct answer: Compilation Fails
Explanation
Correct answer: Compilation Fails.