Private fields of a superclass can be accessed in a subclass
A) by calling private methods declared in the superclass.
B) by calling public or protected methods declared in the superclass.
C) directly.
D) All of the above.
Correct Answer:
Verified
Q7: Which superclass members are inherited by all
Q8: Every class in Java, except _, extends
Q9: Inheritance is also known as the
A) knows-a
Q10: Which of the following is the superclass
Q11: When a subclass constructor calls its superclass
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
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