/** * Created by iyasuwatts on 10/17/17. */ import java.util.Scanner; public class Main { public static void main(String[] args ){ Scanner scan = new Scanner(System.in); String name = ""; do { System.out.println("What is your name?"); name = scan.next(); if (name.equalsIgnoreCase("Alice")) { System.out.println("Hey Alice!!"); } else if (name.equalsIgnoreCase("Bob")) { System.out.println("What's up, Bob!"); } else { System.out.println("Who is that?? Man, I don't know you!!"); } } while (!name.equalsIgnoreCase("Alice") && !name.equalsIgnoreCase("Bob")); } }