Main.java 536B

123456789101112131415161718192021
  1. import java.util.*;
  2. /**
  3. * Created by iyasuwatts on 10/17/17.
  4. */
  5. public class Main {
  6. public static void main(String[] args ){
  7. Scanner in = new Scanner(System.in);
  8. System.out.print("Enter your name. ");
  9. String name = in.nextLine();
  10. if (name.equals("Alice")){
  11. System.out.println("Hello Alice");
  12. } else if
  13. (name.equals("Bob")){
  14. System.out.println("Hello Bob");
  15. }
  16. else
  17. System.out.print("...wait... you're not my parent...");
  18. }}