|
@@ -1,9 +1,33 @@
|
1
|
1
|
/**
|
2
|
2
|
* Created by iyasuwatts on 10/17/17.
|
3
|
3
|
*/
|
|
4
|
+import java.util.Scanner;
|
4
|
5
|
public class Main {
|
5
|
6
|
|
6
|
|
- public static void main(String[] args ){
|
|
7
|
+ public static void main(String[] args )
|
|
8
|
+ {
|
|
9
|
+ }
|
|
10
|
+ public void greetings(){
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+ Scanner input = new Scanner(System.in);
|
|
14
|
+ System.out.println("please enter you name: ");
|
|
15
|
+
|
|
16
|
+ String name = input.next();
|
|
17
|
+ if (name.equals( "Alice"))
|
|
18
|
+ {
|
|
19
|
+ System.out.println("Hello " + name );
|
|
20
|
+ }
|
|
21
|
+ else if (name.equals("Bob"))
|
|
22
|
+ {
|
|
23
|
+ System.out.println("Hello "+ name);
|
|
24
|
+ }
|
7
|
25
|
|
|
26
|
+ else
|
|
27
|
+ {
|
|
28
|
+ System.out.println("Sorry");
|
|
29
|
+
|
|
30
|
+ }
|
8
|
31
|
}
|
9
|
|
-}
|
|
32
|
+
|
|
33
|
+}
|