Which statement is true when a superclass has protected instance variables?
A) A subclass object can assign an invalid value to the superclass's instance variables, thus leaving an object in an inconsistent state.
B) Subclass methods are more likely to be written so that they depend on the superclass's data implementation.
C) We may need to modify all the subclasses of the superclass if the superclass implementation changes.
D) All of the above.
Correct Answer:
Verified
Q10: Which of the following is the superclass
Q11: When a subclass constructor calls its superclass
Q12: Private fields of a superclass can be
Q13: Overriding a method differs from overloading a
Q14: Which of the following is not a
Q15: The default equals implementation of class Object
Q16: Which of the following statements is false?
A)
Q17: To avoid duplicating code, use _, rather
Q18: The default implementation of method clone of
Q20: 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