浏览代码

works now

Jarrett Samuels 6 年前
父节点
当前提交
75c8d895b5
共有 5 个文件被更改,包括 36 次插入16 次删除
  1. 0
    9
      Main.java
  2. 二进制
      greeting.class
  3. 6
    0
      greeting.ctxt
  4. 23
    0
      greeting.java
  5. 7
    7
      package.bluej

+ 0
- 9
Main.java 查看文件

@@ -1,9 +0,0 @@
1
-/**
2
- * Created by iyasuwatts on 10/17/17.
3
- */
4
-public class Main {
5
-
6
-    public static void main(String[] args ){
7
-
8
-    }
9
-}

二进制
greeting.class 查看文件


+ 6
- 0
greeting.ctxt 查看文件

@@ -0,0 +1,6 @@
1
+#BlueJ class context
2
+comment0.target=greeting
3
+comment0.text=\n\ Created\ by\ iyasuwatts\ on\ 10/17/17.\n
4
+comment1.params=args
5
+comment1.target=void\ main(java.lang.String[])
6
+numComments=2

+ 23
- 0
greeting.java 查看文件

@@ -0,0 +1,23 @@
1
+import java.util.*;
2
+
3
+/**
4
+ * Created by iyasuwatts on 10/17/17.
5
+ */
6
+public class greeting {
7
+    
8
+    public static void main(String[] args ){    
9
+    
10
+    Scanner in = new Scanner(System.in);
11
+    
12
+    System.out.print("What's your name?");
13
+    String name = in.nextLine();
14
+    name = name.toLowerCase();
15
+//   System.out.print(name);        testing testing
16
+    
17
+    if (name.equals("bob") || name.equals("alice")) {
18
+        System.out.print("Access Granted!");
19
+    }
20
+    else {
21
+        System.out.print("Access Denied.");
22
+    };
23
+}};

+ 7
- 7
package.bluej 查看文件

@@ -1,16 +1,16 @@
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=709
3
+editor.fx.0.width=800
4
+editor.fx.0.x=314
5
+editor.fx.0.y=25
6 6
 objectbench.height=101
7 7
 objectbench.width=776
8 8
 package.divider.horizontal=0.6
9 9
 package.divider.vertical=0.8007380073800738
10 10
 package.editor.height=427
11 11
 package.editor.width=674
12
-package.editor.x=181
13
-package.editor.y=109
12
+package.editor.x=27
13
+package.editor.y=84
14 14
 package.frame.height=600
15 15
 package.frame.width=800
16 16
 package.numDependencies=0
@@ -24,7 +24,7 @@ readme.width=47
24 24
 readme.x=10
25 25
 readme.y=10
26 26
 target1.height=50
27
-target1.name=Main
27
+target1.name=greeting
28 28
 target1.showInterface=false
29 29
 target1.type=ClassTarget
30 30
 target1.width=80