|
@@ -1,9 +1,22 @@
|
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
|
+ }
|
|
8
|
+
|
|
9
|
+ public void greeting(){
|
|
10
|
+ Scanner keyboard = new Scanner(System.in);
|
|
11
|
+ System.out.print("what is your name?");
|
|
12
|
+ String name = keyboard.nextLine();
|
7
|
13
|
|
|
14
|
+ if(name.equals("Alice")){
|
|
15
|
+ System.out.println("Hello Alice!");
|
|
16
|
+ } else if (name.equals("Bob")){
|
|
17
|
+ System.out.println("Hello Bob!");
|
|
18
|
+ } else {
|
|
19
|
+ System.out.println("Hello " + name);
|
|
20
|
+ }
|
8
|
21
|
}
|
9
|
|
-}
|
|
22
|
+}
|