Given the following class hierarchy:
Which of the following statements is true.
X. Every B object is also an A object.
Y. Every A object is also a B object.
Correct Answer : D
Given classes are
A and class
B are not related as parent-child. So neither, every object of A is object of B nor vice-versa.
If it was like below:
class B extends A
Topic: Is-A Relationship In Java