Question: Which of the following statements about Java inheritance is true? A. The diamond problem occurs when a class inherits from multiple classes that have a

Which of the following statements about Java inheritance is true?


A. The diamond problem occurs when a class inherits from multiple classes that have a common ancestor.

B. In Java, a subclass can inherit from multiple parent classes using the extends keyword.

C. The protected access modifier can be used to restrict access to superclass methods within the subclass.

D. Dynamic method dispatch is a feature of inheritance that allows a subclass to override a method of its superclass.

Step by Step Solution

3.49 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below Explanation Option A is a common proble... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!