1234567891011121314151617181920212223242526
  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 response = new Scanner(System.in);
  8. System.out.println("What's your name? ");
  9. for(int i=0; i<5;i++){
  10. String RespondersName = response.nextLine();
  11. if (RespondersName.equals("Bob") || RespondersName.equals("bob") ||RespondersName.equals("BOB")) {
  12. System.out.println("Greetings " + RespondersName);
  13. //break;
  14. } else if (RespondersName.equals("alice") || RespondersName.equals("Alice") || RespondersName.equals("ALICE")){
  15. System.out.println("Greetings " + RespondersName);
  16. //break;
  17. } else {
  18. System.out.println("Your name is not Alice or Bob");
  19. }
  20. }
  21. }
  22. }