Important Java Mcq 1

Which of the following best describes inheritance?

a) Ability of a class to derive members of another class as a part of its definition

b) Means of bundling instance variables and methods to restrict access to certain class members

c) Focuses on variables and passing of variables to functions

d) Allows for implementation of elegant software that is well-designed and easily modified

Answer:

a) Ability of a class to derive members of another class as a part of its definition

Explanation:

The capability of a class to derive properties and characteristics from another class is called Inheritance. Inheritance is a crucial feature of Object-Oriented Programming. Inheritance is a feature or a process in which new classes are created from the existing classes. So option A is true.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?