/** * Created by iyasuwatts on 10/17/17. */ import java.util.Scanner; public class Main { // the name user input public static void main(String[] args ){ Scanner kb = new Scanner(System.in); System.out.println("Enter a name"); String n = kb.nextLine(); aliceOrBob(n); } public static void aliceOrBob(String name) { String message = name.equals("Alice") || name.equals("Bob") ? ("Hello " + name) : ("Try a new name"); System.out.println(message); } }