Advertisement
DulcetAirman

Untitled

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