fork download
  1. class Constants {
  2.  
  3. static final int STATIC_VAR = 1;
  4.  
  5. final int INSTANCE_VAR = 2;
  6.  
  7. void example() {
  8. final int LOCAL_VAR = 3;
  9.  
  10. switch(0) {
  11. case STATIC_VAR: System.out.println("one"); break;
  12. case INSTANCE_VAR: System.out.println("two"); break;
  13. case LOCAL_VAR: System.out.println("three"); break;
  14. }
  15. }
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
spoj: The program compiled successfully, but main class was not found.
      Main class should contain method: public static void main (String[] args).
stdout
Standard output is empty