Important Java Mcq 1

The mechanism of designing a new class based on one or more existing classes is called?

a. Polymorphism

b. Inheritance

c. Abstraction

d. Encapsulation

Answer:

b. Inheritance

Explanation

Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a parent object. It is an important part of OOPs (Object Oriented programming systems). The idea behind inheritance in Java is that you can create new classes that are built upon existing classes.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?