9. 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);
}
}
09
8
Compilation error
O Runtime error
Answers
Answered by
0
There would be coming a Compilation error because the syntax of the code is wrong. Why is there 09 and 8 after the method "main" and also the class "main_class" has not been closed .
Similar questions