/** * Created by iyasuwatts on 10/17/17. */ import java.util.*; public class Greeting { public static void main(String[] args ){ } public void sayHi(){ Scanner wordTyped = new Scanner(System.in); System.out.println("What is your name"); String name = wordTyped.nextLine(); if (name.equals("Alice")) { System.out.println("Hi Alice!"); } else if (name.equals("Bob")){ System.out.println("Hi Bob!"); } else { System.out.println("Go away, this program is only for Alice and Bob!"); } } }