1

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); } } }

Correct Answer: Compilation error

Make the most of this question

This page focuses on one JAVA MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.