fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13.  
  14. int a = 6;
  15. int error = 0;
  16.  
  17. switch (a){
  18. case 4:
  19. case 5:
  20. case 37:
  21. case 6: break;
  22. default: error = 4; // invalid prefix
  23. }
  24.  
  25. System.out.print(error);
  26. if (error == 0)
  27. System.out.print("good");
  28.  
  29. }
  30.  
  31. }
Success #stdin #stdout 0.07s 381184KB
stdin
Standard input is empty
stdout
0good