Q122
What will be the output of the following Java program? class main_class public static void main(String args[]) int x = 9; if (x == 9) int x = 8; System.out.println(x);
A.
9
B.
8
C.
Compilation error
AnswerD.
Runtime error
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board