Multiple choice general knowledge

among the following which one is not a feature of Inheritance in Java?

  1. The subclass and the superclass has an "is-a" relationship.

  2. Inheritance cannot change the behaviors of the existing class

  3. The original class is the parent class or the base class or the superclass.

  4. The new class is called a child class or a subclass or a derived class of the parent.

  5. In a subclass you can add new methods and new fields as well as override existing methods in the parent class to change their behaviors.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Inheritance in Java explicitly allows changing behaviors through method overriding - a subclass can override methods from the parent class to provide different implementations. This is a core feature of inheritance, making option B the correct choice as it is NOT a feature of inheritance.