質問編集履歴

2

実行結果およびコードの修正

2018/11/08 01:59

投稿

shou_hitotose
shou_hitotose

スコア66

test CHANGED
File without changes
test CHANGED
@@ -152,6 +152,8 @@
152
152
 
153
153
  int i;
154
154
 
155
+ String person_one;
156
+
155
157
  System.out.print("NAME: " + person_one.name + "\n");
156
158
 
157
159
  System.out.print("Date of Birth: " + p.the_date_of_birth.birth_year

1

指摘されたコードの修正兼その実行結果の更新

2018/11/08 01:59

投稿

shou_hitotose
shou_hitotose

スコア66

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  class DateOfBirth {
8
8
 
9
- public static void main(String args[]){
9
+
10
10
 
11
11
  int birth_year;
12
12
 
@@ -16,13 +16,13 @@
16
16
 
17
17
  boolean known;
18
18
 
19
- }
19
+
20
20
 
21
21
  }
22
22
 
23
23
  class Myfriend {
24
24
 
25
- public static void main(String args[]){
25
+
26
26
 
27
27
  String name;
28
28
 
@@ -30,13 +30,13 @@
30
30
 
31
31
  String phone_number;
32
32
 
33
- }
33
+
34
34
 
35
35
  }
36
36
 
37
37
  class Person {
38
38
 
39
- public static void main(String args[]){
39
+
40
40
 
41
41
  String name;
42
42
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  Myfriend[] friend;
50
50
 
51
- }
51
+
52
52
 
53
53
  }
54
54
 
@@ -197,3 +197,17 @@
197
197
  }
198
198
 
199
199
  ```
200
+
201
+
202
+
203
+ (実行結果)
204
+
205
+ DateOfBirth.java:76: エラー: シンボルを見つけられません
206
+
207
+ System.out.print("NAME: " + person_one.name + "\n");
208
+
209
+ ^
210
+
211
+ シンボル: 変数 name
212
+
213
+ 場所: タイプStringの変数 person_one