A
Q. 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);
}
}
- Correct Answer - Option(D)
- Views: 16
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.