Important Java Mcq 1

In java declaring a class abstract is useful

a. To prevent developers from further extending the class.

b. When default implementations of some methods are not desirable.

c. When it doesn’t make sense to have objects of that class.

d. When it makes sense to have objects of that class.

Answer:

c. When it doesn’t make sense to have objects of that class.

Explanation:

Remaining other choices are opposite to the meaning of abstract class.
Abstract class and methods allow the other classes to achieve the functionality of multiple
inheritance in java.

Related MCQs

multiple inheritance means?

a. one class inheriting from more superclasses b. more classes inheriting from more superclasses c. more classes inheriting from one superclass d. None of the

Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?