class JavaScoping2 { public static void main(String[] args) { { double x; x = 3.14; System.out.println("x = " + x); // This is OK } System.out.println("x = " + x); // This will cause an error // because x is NOT visible in // the OUTER SCOPE !!! } }