2019”N11ŒŽ09“ú

—ߘaŒ³”N“x@‹ZpŽm‘æˆêŽŸŽŽŒ±–â‘è@î•ñHŠw•”–å@‡V|‚P‚X

‡V|‚P‚X

ˆÈ‰º‚̃V[ƒPƒ“ƒX}‚ðJavaƒvƒƒOƒ‰ƒ€‚Å•\Œ»‚µ‚½‚Æ‚«‚ɁAƒvƒƒOƒ‰ƒ€’†‚Ì (a) ` (c) ‚É“ü‚é‘g‡‚¹‚Æ‚µ‚āAÅ‚à“KØ‚È‚à‚Ì‚Í‚Ç‚ê‚©B
—ߘaŒ³”N“x@‹ZpŽm‘æˆêŽŸŽŽŒ±–â‘è@î•ñHŠw•”–å@‡V|‚P‚X

class (a) {
@(c) insP;
@void methodX() {
@@insP.methodY();
@}
}

class (b) {
@(a) insQ;
@void method1() {
@@insQ.methodX();
@}
@void methodZ() {
@}
}

class (c) {
@(b) insR;
@void methodY() {
@}
@method2() {
@@insR.methodZ();
@}
}

@@@a@@ @b@ @@c

‡@@ClassA@ClassB@ClassC

‡A@ClassA@ClassC@ClassB

‡B@ClassB@ClassC@ClassA

‡C@ClassB@ClassA@ClassC

‡D@ClassC@ClassA@ClassB




“š‚¦‚Í‚±‚¿‚ç
ƒ^ƒOFJAVA
posted by ƒtƒ@[ƒXƒgƒ}ƒNƒ at 08:19| Comment(0) | R01‹ZpŽmˆêŽŸŽŽŒ±(î•ñHŠw)