C++ Inheritance MCQs in Java Questions & Answers - 2

Question: 6

The process of creating new data types from existing data type is called as ____

(A) Encapsulation

(B) Overloading

(C) Polymorphism

(D) Inheritance

Ans: D

Inheritance

Question: 7

In inheritance, protected members of base class are inherited as ____ when private access specifier is used.

(A) Public members

(B) Private members

(C) Protected members

(D) Not inherited at all

Ans: B

Private members

Question: 8

Reusability of code, code sharing, consistency of interface are all advantages of ____

(A) Encapsulation

(B) Inheritance

(C) Polymorphism

(D) Overloading

Ans: B

Inheritance

Question: 9

The class created from an existing base class is called ___

(A) Second class

(B) New class

(C) Derived class

(D) Rich class

Ans: C

Derived class

Question: 10

The class from which the other classes are derived is called as ____

(A) Objects

(B) Functions

(C) Sub-class

(D) Object class

Ans: B

Functions

Related Questions