Guest User

Untitled

a guest
Feb 14th, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TextMsgAbbreviation {
  4. public static void main(String[] args) {
  5.  
  6. Scanner scnr = new Scanner(System.in);
  7. String textMsg1 = "";
  8.  
  9. System.out.println("Input an abbreviation: ");
  10. textMsg1 =scnr.nextLine();
  11.  
  12. switch(textMsg1) {
  13. case "LOL" : System.out.println("laughing out loud");
  14. break;
  15. case "IDK" : System.out.println("I don't know");
  16. break;
  17. case "BFF" : System.out.println("best friends forever");
  18. break;
  19. case "IMHO": System.out.println("in my humble opinion");
  20. break;
  21. case "TMI" : System.out.println ("too much information");
  22. break;
  23. default : System.out.println("Unknown");
  24. }
  25. return;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment