fork(1) download
  1. public class Test
  2. {
  3. public static void main(String[] args){
  4. testFinalLocalScope();
  5. int x = TEST;
  6.  
  7. System.out.println("Worked: " + x);
  8. }
  9.  
  10. public static void testFinalLocalScope(){
  11. final int TEST = 5;
  12. }
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty