123456789101112131415161718192021222324252627
  1. /**
  2. * Created by iyasuwatts on 10/17/17.
  3. */
  4. import java.util.Scanner;
  5. public class Main {
  6. public static void main(String[] args ){
  7. Scanner user_input = new Scanner(System.in);
  8. String name;
  9. while(true){
  10. System.out.print("Enter your name: ");
  11. name = user_input.next();
  12. if(name.equals ("Alice")){
  13. System.out.println("Hi Alice.");
  14. }else if(name.equals ("Bob")){
  15. System.out.println("Hi Bob.");
  16. }else{
  17. System.out.println("I don't know you.");
  18. }
  19. }
  20. }
  21. }