import java.util.*; /** * Created by iyasuwatts on 10/17/17. */ public class Main { public static void main(String[] args ){ boolean fl = false; Scanner in = new Scanner(System.in); System.out.println("What is your name?"); while (fl = false) { String name = in.nextLine(); if (name.equals("alice") || name.equals("Alice")) { System.out.println("Hello, Alice"); fl = true; } else if (name.equals("bob") || name.equals("Bob")) { System.out.println("Hello, Bob"); fl = true; } } } }