Advertisements
Advertisements
Question
Name the feature of java depicted in the above picture.

Options
Encapsulation
Inheritance
Abstraction
Abstraction
MCQ
Advertisements
Solution
Inheritance
Explanation:
The image displays a “father” and a “child” relationship. In object-oriented programming, inheritance is the mechanism where a child class (subclass) acquires or inherits the properties and behaviors of a parent class (superclass), perfectly mirroring biological inheritance.
shaalaa.com
Is there an error in this question or solution?
Chapter 2: Class as the Basis of all Computation - Exercises [Page 64]
