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
Please read the guide .
Please answer the question in detail
Doubtly is an online community for engineering students, offering:
Get the pro version for free by logging in!
5.7k questions
5.1k answers
108 comments
557 users