Saturday, January 16, 2016

What is abstract class?

Abstract Class:
  1. We cannot use abstract classes to instantiate objects directly. For example, Shape s = new Shape(); is illegal because Shape is an abstract class.
  2. The abstract methods of an abstract class must be defined in its subclass.
  3. We cannot declare abstract constructors or abstract static methods.

No comments:

Post a Comment