質問編集履歴
1
wakariyasuku
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,3 +11,65 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
どのようにすべきかご教示お願いします。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
```Java
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
class A {
|
22
|
+
|
23
|
+
int value;
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
int getValue() {
|
28
|
+
|
29
|
+
return value;
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
void setValue(int value) {
|
36
|
+
|
37
|
+
this.value = value;
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
class B {
|
46
|
+
|
47
|
+
A a;
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
void setA(A a) {
|
52
|
+
|
53
|
+
this.a = a;
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
class C {
|
62
|
+
|
63
|
+
A a;
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
void setA(A a) {
|
68
|
+
|
69
|
+
this.a = a;
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
}
|
74
|
+
|
75
|
+
```
|