What will be the output of this Java program?
public class Demo { public static void main(String[] args) { int x = 10; { int x = 20; System.out.println(x); } } }
20
10
Compilation Error
Runtime Error
This question is part of this quiz :
Java Variables