Main.java 656B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Created by iyasuwatts on 10/17/17.
  3. */
  4. import java.util.*;
  5. public class Main {
  6. public static void main(String[] args ){
  7. Scanner sc = new Scanner (System.in);
  8. System.out.println("What is your name?");
  9. String name = sc.nextLine();
  10. if (name.equals ("Alice")|| name.equals("alice")){
  11. System.out.println("Hello Alice!");
  12. }
  13. else if (name.equals ("Bob")|| name.equals("bob")){
  14. System.out.println("Hello Bob!");
  15. }
  16. else {
  17. System.out.println("You are not Alice or Bob!!!!!");
  18. }
  19. }
  20. }