Monday, July 5, 2010

Abstract Classes

Abstract classes are classes which contain one or more abstract methods. To ensure that a subclass overrides all necessary methods the abstract type modifier is used. The following restrictions apply:
• An abstract class cannot be instantiated i.e. no objects can be created, because an abstract class is not fully defined.
• Constructors and static methods cannot be declared as abstract.
• Any subclass of an abstract class must either implement all of the abstract methods in the superclass, or be itself declared abstract.

No comments:

Post a Comment