What will be the output of the following Java program?
What will be the output of the following Java program?
-
class variable_scope
-
{ -
public static void main(String args[])
-
{ -
int x;
-
x = 5;
-
{ -
int y = 6;
-
System.out.print(x + " " + y);
-
}
-
System.out.println(x + " " + y);
-
}
-
}
a) Compilation error
b) Runtime error
c) 5 6 5 6
d) 5 6 5