public class Test{ public static void main(String[] args){ testFinalLocalScope(); int x = TEST; System.out.println("Worked: " + x); } public static void testFinalLocalScope(){ final int TEST = 5; }}
Standard input is empty
Main.java:1: error: class Test is public, should be declared in a file named Test.java public class Test ^ Main.java:5: error: cannot find symbol int x = TEST; ^ symbol: variable TEST location: class Test 2 errors
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!