Main.java 689B

123456789101112131415161718192021222324
  1. import java.util.Scanner;
  2. /**
  3. * Created by iyasuwatts on 10/17/17.
  4. */
  5. public class Main {
  6. /**
  7. * No object instance is to be created to run static main method
  8. * Run test from 'Main' class 'main' method - right click 'Main' class, select 'main'
  9. */
  10. public static void main(String[] args ){
  11. Scanner keyboard = new Scanner(System.in);
  12. System.out.println("Please enter your name.");
  13. String name = keyboard.next();
  14. if(name.equalsIgnoreCase("Alice") || name.equalsIgnoreCase("Bob"))
  15. {
  16. System.out.println("Hello " + name);
  17. }
  18. }
  19. }