Important Java Mcq 1

Which of the following statements is wrong about inheritance?

a) Protected members of a class can be inherited

b) The inheriting class is called a subclass

c) Private members of a class can be inherited and accessed

d) Inheritance is one of the features of OOP

Answer

c) Private members of a class can be inherited and accessed

Explanation:

The private modifier specifies that the member can be accessed only in its class. Thus, option C is correct.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?