Zavon Malone 6 gadus atpakaļ
vecāks
revīzija
26d820dcb4
4 mainītis faili ar 31 papildinājumiem un 11 dzēšanām
  1. Binārs
      Main.class
  2. 5
    0
      Main.ctxt
  3. 17
    2
      Main.java
  4. 9
    9
      package.bluej

Binārs
Main.class Parādīt failu


+ 5
- 0
Main.ctxt Parādīt failu

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

+ 17
- 2
Main.java Parādīt failu

@@ -1,9 +1,24 @@
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
-
7
+    public static void main(String[] args ){ 
8
+        Scanner in = new Scanner(System.in);
9
+        System.out.print ("What is your name");
10
+        String name = in.nextLine();
11
+        //String firstName = in.nextLine();
12
+        System.out.print(name);
13
+        if (name.equals("Alice")){
14
+            System.out.println(" Hey Alice");
15
+        } else if (name.equals("Bob")){
16
+            System.out.println(" Hey Bob");
17
+        } else {
18
+            System.out.println(" Why are you here");
19
+        }
8 20
     }
21
+
9 22
 }
23
+
24
+

+ 9
- 9
package.bluej Parādīt failu

@@ -1,18 +1,18 @@
1 1
 #BlueJ package file
2
-editor.fx.0.height=0
3
-editor.fx.0.width=0
4
-editor.fx.0.x=0
5
-editor.fx.0.y=0
2
+editor.fx.0.height=717
3
+editor.fx.0.width=892
4
+editor.fx.0.x=388
5
+editor.fx.0.y=23
6 6
 objectbench.height=101
7
-objectbench.width=776
7
+objectbench.width=596
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=494
12
+package.editor.x=0
13
+package.editor.y=23
14 14
 package.frame.height=600
15
-package.frame.width=800
15
+package.frame.width=620
16 16
 package.numDependencies=0
17 17
 package.numTargets=1
18 18
 package.showExtends=true