123456789101112131415161718192021222324252627 |
- /**
- * Created by iyasuwatts on 10/17/17.
- */
-
- import java.util.Scanner;
-
- public class Main {
-
- public static void main(String[] args ){
- Scanner user_input = new Scanner(System.in);
- String name;
-
- while(true){
- System.out.print("Enter your name: ");
- name = user_input.next();
-
- if(name.equals ("Alice")){
- System.out.println("Hi Alice.");
- }else if(name.equals ("Bob")){
- System.out.println("Hi Bob.");
- }else{
- System.out.println("I don't know you.");
- }
- }
- }
- }
|