瀏覽代碼

greeting bob and alice

Jacob Andersen 6 年之前
父節點
當前提交
dc5162f047
共有 4 個文件被更改,包括 22 次插入8 次删除
  1. 二進制
      Main.class
  2. 5
    0
      Main.ctxt
  3. 10
    1
      Main.java
  4. 7
    7
      package.bluej

二進制
Main.class 查看文件


+ 5
- 0
Main.ctxt 查看文件

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

+ 10
- 1
Main.java 查看文件

1
 /**
1
 /**
2
  * Created by iyasuwatts on 10/17/17.
2
  * Created by iyasuwatts on 10/17/17.
3
  */
3
  */
4
+import java.util.Scanner;
5
+
4
 public class Main {
6
 public class Main {
5
 
7
 
6
-    public static void main(String[] args ){
8
+    public static void main(String[] args){
9
+
10
+        Scanner sc = new Scanner (System.in);
11
+        String name = sc.nextLine();
12
+        if (name.equals("Bob")|| name.equals("Alice")) {
13
+            System.out.println("Hi " + name + "!");
14
+        }
7
 
15
 
8
     }
16
     }
9
 }
17
 }
18
+

+ 7
- 7
package.bluej 查看文件

1
 #BlueJ package file
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
6
-objectbench.height=101
2
+editor.fx.0.height=717
3
+editor.fx.0.width=800
4
+editor.fx.0.x=240
5
+editor.fx.0.y=23
6
+objectbench.height=105
7
 objectbench.width=776
7
 objectbench.width=776
8
 package.divider.horizontal=0.6
8
 package.divider.horizontal=0.6
9
-package.divider.vertical=0.8007380073800738
10
-package.editor.height=427
9
+package.divider.vertical=0.7859778597785978
10
+package.editor.height=419
11
 package.editor.width=674
11
 package.editor.width=674
12
 package.editor.x=181
12
 package.editor.x=181
13
 package.editor.y=109
13
 package.editor.y=109