Browse Source

Ray is finished. Hopefully#

rayskeez21 6 years ago
parent
commit
0a96d01e0f
3 changed files with 17 additions and 2 deletions
  1. BIN
      Main.class
  2. 5
    0
      Main.ctxt
  3. 12
    2
      Main.java

BIN
Main.class View File


+ 5
- 0
Main.ctxt View File

@@ -0,0 +1,5 @@
1
+#BlueJ class context
2
+comment0.target=Main
3
+comment1.params=args
4
+comment1.target=void\ main(java.lang.String[])
5
+numComments=2

+ 12
- 2
Main.java View File

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