Sunday 17 March 2013

SCJP - 10 -Which statement(s) are true? (Choose all that apply.)


10. Which statement(s) are true? (Choose all that apply.)

A. Has-a relationships always rely on inheritance.
B. Has-a relationships always rely on instance variables.
C. Has-a relationships always require at least two class types.
D. Has-a relationships always rely on polymorphism.
E. Has-a relationships are always tightly coupled.

Answer:

B is correct.
A and D describe other OO topics. C is incorrect because a class can have an instance of
itself. E is incorrect because while has-a relationships can lead to tight coupling, it is by no
means always the case. (Objective 5.5)

No comments:

Post a Comment