Accenture Java Programming Practice Question
Predict the Output of following Java Program. class Test { int x = 10; public static void main(String[] args) { System.out.println(x); } }Answer options
A
Compile Time Error
B
10
C
Runtime Exception
D
0
Correct answer: Compile Time Error
Explanation
Correct answer: Compile Time Error.