質問編集履歴
5
修正⑤
test
CHANGED
File without changes
|
test
CHANGED
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
|
84
84
|
|
85
|
-
static フィールド Hero.money には static にアクセスする必要があります Main.java
|
85
|
+
警告:static フィールド Hero.money には static にアクセスする必要があります Main.java
|
86
86
|
|
87
87
|
|
88
88
|
|
4
修正④
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Mainクラスの12, 13 14行目で警告が出ています。これを修正したいです。
|
2
2
|
|
3
3
|
|
4
4
|
|
3
修正③
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Heroクラスで、宣言してる static int moneyが
|
1
|
+
Heroクラスで、宣言してる static int moneyフィールドがMainクラスで参照されない!
|
test
CHANGED
File without changes
|
2
修正②
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,7 +78,9 @@
|
|
78
78
|
|
79
79
|
|
80
80
|
|
81
|
-
``
|
81
|
+
```
|
82
|
+
|
83
|
+
|
82
84
|
|
83
85
|
static フィールド Hero.money には static にアクセスする必要があります Main.java
|
84
86
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -58,13 +58,13 @@
|
|
58
58
|
|
59
59
|
|
60
60
|
|
61
|
-
System.out.println(Hero.money);
|
61
|
+
System.out.println(Hero.money);
|
62
62
|
|
63
|
-
System.out.println(h1.money);
|
63
|
+
System.out.println(h1.money);
|
64
64
|
|
65
|
-
h1.money;
|
65
|
+
h1.money;
|
66
66
|
|
67
|
-
System.out.println(h2.money);
|
67
|
+
System.out.println(h2.money);
|
68
68
|
|
69
69
|
|
70
70
|
|
@@ -78,7 +78,11 @@
|
|
78
78
|
|
79
79
|
|
80
80
|
|
81
|
-
``
|
81
|
+
``
|
82
|
+
|
83
|
+
static フィールド Hero.money には static にアクセスする必要があります Main.java
|
84
|
+
|
85
|
+
|
82
86
|
|
83
87
|
参考書通りのコードなのですが、正常ではないようです!
|
84
88
|
|