Thursday, June 01, 2006

Abstract classes

Technically, an abstract class does not have to contain any abstract methods. This is rather unusual, but in such a case, the class simply cannot be instantiated.

> If a subclass does not override all abstract methods, it also must be declared an abstract class. If you try to compile the such class without overriding all abstract methods, the compiler alerts you to this and tells you to either override them or declare this class abstract as well.
> No abstract methods can be declared as private, final, or static.

0 Comments:

Post a Comment

<< Home