|
@@ -1,9 +1,30 @@
|
1
|
1
|
/**
|
2
|
2
|
* Created by iyasuwatts on 10/17/17.
|
3
|
3
|
*/
|
4
|
|
-public class Main {
|
5
|
4
|
|
6
|
|
- public static void main(String[] args ){
|
|
5
|
+ import java.util.Scanner;
|
|
6
|
+
|
|
7
|
+public class Main {
|
7
|
8
|
|
|
9
|
+ public static void main(String[] args ){
|
|
10
|
+ /*intialize scanner*/
|
|
11
|
+ Scanner scanner = new Scanner(System.in);
|
|
12
|
+
|
|
13
|
+ System.out.print("What is your name?");
|
|
14
|
+
|
|
15
|
+ String name = scanner.nextLine();
|
|
16
|
+
|
|
17
|
+ if (name.equals("Alice")) {
|
|
18
|
+ System.out.println("Hey Alice ");
|
|
19
|
+ } else if (name.equals("Bob")) {
|
|
20
|
+ System.out.println("Hello Bob!");
|
|
21
|
+
|
|
22
|
+ } else { System.out.println("Unexpected User");
|
|
23
|
+
|
|
24
|
+ }
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+ }
|
8
|
28
|
}
|
9
|
|
-}
|
|
29
|
+
|
|
30
|
+
|