fork download
  1. enum E {
  2. A, B, C
  3. }
  4.  
  5. class Test {
  6. private static int f(E e) {
  7. switch (e) {
  8. case A: return 1;
  9. case B: return 3;
  10. case C: return 7;
  11. }
  12. }
  13. public static void main(String[] args) {
  14. System.out.println(f(E.A));
  15. }
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:12: missing return statement
    }
    ^
1 error
stdout
Standard output is empty