[java] TextMsg

Viewer

  1. /*The purpose of this program is to prompt the user 
  2. to enter a common text message abbreviation and determine 
  3. which abbreviation was entered and what it means.
  4. Created w/ VSCode
  5. */
  6.  
  7. import java.util.Scanner;
  8.  
  9. public class TextMsg {
  10.     public static void main(String[]args){
  11.         Scanner scnr = new Scanner(System.in);
  12.         String userString;
  13.         
  14.          System.out.println("Input an abbreviation:");
  15.          userString = scnr.next();
  16.          //fill in the required expressions within the parens to match each abbreviations
  17.          //hint: can you use == with strings?
  18.          if (      ) { 
  19.             System.out.println("for what it's worth");
  20.          }
  21.          else if (    ) {
  22.             System.out.println("worst of all time");
  23.          }
  24.          else if (     ) {
  25.             System.out.println("i don't really know");
  26.          }
  27.          else if (   ) {
  28.             System.out.println("fear of missing out");
  29.          } 
  30.          else if (     ){
  31.                System.out.println("in real life");
  32.          }
  33.          else {
  34.             System.out.println("Unknown");
  35.             }
  36.       }
  37.    }

Editor

You can edit this paste and save as new:


File Description
  • TextMsg
  • Paste Code
  • 28 Sep-2022
  • 1.13 Kb
You can Share it: