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. int rand = 0;
  13. int indexer = 4;
  14.  
  15. switch (rand) {
  16. case 0:
  17. if (indexer == rand) {
  18. break;
  19. } else {
  20. rand++;
  21. }
  22. case 1:
  23. if (indexer == rand) {
  24. break;
  25. } else {
  26. rand++;
  27. }
  28. case 2:
  29. if (indexer == rand) {
  30. break;
  31. } else {
  32. rand++;
  33. }
  34. case 3:
  35. if (indexer == rand) {
  36. break;
  37. } else {
  38. rand++;
  39. }
  40. case 4:
  41. if (indexer == rand) {
  42. System.out.println("Hola!");
  43. break;
  44. } else {
  45. }
  46. default:
  47. break;
  48. }
  49. }
  50. }
Success #stdin #stdout 0.07s 32548KB
stdin
Standard input is empty
stdout
Hola!