Explorar el Código

Ray is finished. Hopefully#

rayskeez21 hace 6 años
padre
commit
0a96d01e0f
Se han modificado 3 ficheros con 17 adiciones y 2 borrados
  1. BIN
      Main.class
  2. 5
    0
      Main.ctxt
  3. 12
    2
      Main.java

BIN
Main.class Ver fichero


+ 5
- 0
Main.ctxt Ver fichero

@@ -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 Ver fichero

@@ -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
 }