Which statement best describes the relationship between superclass and subclass types?
A) A subclass reference cannot be assigned to a superclass variable and a superclass reference cannot be assigned to a subclass variable.
B) A subclass reference can be assigned to a superclass variable and a superclass reference can be assigned to a subclass variable.
C) A superclass reference can be assigned to a subclass variable, but a subclass reference cannot be assigned to a superclass variable.
D) A subclass reference can be assigned to a superclass variable, but a superclass reference cannot be assigned to a subclass variable.
Correct Answer:
Verified
Q11: When a superclass variable refers to a
Q12: For which of the following would polymorphism
Q13: Which of the following is false?
A) You
Q14: Which of the following could be used
Q15: Consider classes A, B and C, where
Q17: Assigning a subclass reference to a superclass
Q18: Classes and methods are declared final for
Q19: All of the following methods are implicitly
Q20: Consider the abstract superclass below:
public abstract
Q21: Which of the following statements is false?
A)
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents