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