Use of an abstract class without any abstract methods

gifpif picture gifpif · Aug 3, 2013 · Viewed 12.8k times · Source

An abstract class need not include any abstract methods.

Is there any other reason to make a class abstract other than the fact that abstract classes can't be instantiated?

Answer

Ankur Shanbhag picture Ankur Shanbhag · Aug 3, 2013

Abstract class means the definition of the class is not complete and hence cannot be instantiated. Even though it does not have abstract method, it is an indicator that the class is available for inheritance. Even though it has implementation for all the methods in it, the implementation may still not be complete and must be overridden by the extending class.