123456789101112131415161718192021222324252627282930
  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. boolean fl = false;
  8. Scanner in = new Scanner(System.in);
  9. System.out.println("What is your name?");
  10. while (fl = false) {
  11. String name = in.nextLine();
  12. if (name.equals("alice") || name.equals("Alice")) {
  13. System.out.println("Hello, Alice");
  14. fl = true;
  15. }
  16. else if (name.equals("bob") || name.equals("Bob")) {
  17. System.out.println("Hello, Bob");
  18. fl = true;
  19. }
  20. }
  21. }
  22. }