|
@@ -1,9 +1,16 @@
|
1
|
1
|
/**
|
2
|
2
|
* Created by iyasuwatts on 10/17/17.
|
3
|
3
|
*/
|
4
|
|
-public class Main {
|
|
4
|
+import java.util.Scanner;
|
5
|
5
|
|
6
|
|
- public static void main(String[] args){
|
7
|
|
-
|
8
|
|
- }
|
|
6
|
+public class Main {
|
|
7
|
+ public static void main(String[] args){
|
|
8
|
+ System.out.println("What is your name?: ");
|
|
9
|
+ Scanner scan = new Scanner(System.in);
|
|
10
|
+ String name = scan.nextLine();
|
|
11
|
+ String output = name.equals("Alice") || name.equals("Bob")
|
|
12
|
+ ? "Hello " + name
|
|
13
|
+ : "Stranger danger!";
|
|
14
|
+ System.out.println(output);
|
|
15
|
+ }
|
9
|
16
|
}
|