ThuyKhong 6 år sedan
förälder
incheckning
5d5e92f730
4 ändrade filer med 22 tillägg och 6 borttagningar
  1. Binär
      Main.class
  2. 5
    0
      Main.ctxt
  3. 12
    1
      Main.java
  4. 5
    5
      package.bluej

Binär
Main.class Visa fil


+ 5
- 0
Main.ctxt Visa fil

@@ -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
- 1
Main.java Visa fil

@@ -1,9 +1,20 @@
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 scan = new Scanner(System.in);
9
+    
10
+    System.out.println("What is your name?");
11
+    String name = scan.nextLine();
12
+    
13
+    if (name.equalsIgnoreCase("Alice")) 
14
+    System.out.println("Hello Alice!");
15
+    else if (name.equalsIgnoreCase("Bob")) 
16
+    System.out.println("Hello Bob");
17
+    else
18
+    System.out.println("Okay");
8 19
     }
9 20
 }

+ 5
- 5
package.bluej Visa fil

@@ -4,15 +4,15 @@ editor.fx.0.width=0
4 4
 editor.fx.0.x=0
5 5
 editor.fx.0.y=0
6 6
 objectbench.height=101
7
-objectbench.width=776
7
+objectbench.width=709
8 8
 package.divider.horizontal=0.6
9 9
 package.divider.vertical=0.8007380073800738
10 10
 package.editor.height=427
11
-package.editor.width=674
12
-package.editor.x=181
13
-package.editor.y=109
11
+package.editor.width=607
12
+package.editor.x=1445
13
+package.editor.y=70
14 14
 package.frame.height=600
15
-package.frame.width=800
15
+package.frame.width=733
16 16
 package.numDependencies=0
17 17
 package.numTargets=1
18 18
 package.showExtends=true