fork(23) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. String stringToSwitch = "A";
  10. switch (stringToSwitch) {
  11. case "a":
  12. System.out.println("a");
  13. break;
  14. case "A":
  15. System.out.println("A"); //the code goes here
  16. break;
  17. case "B":
  18. System.out.println("B");
  19. break;
  20. default:
  21. break;
  22. }
  23. }
  24. }
Success #stdin #stdout 0.1s 320512KB
stdin
Standard input is empty
stdout
A