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