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