|
|
|
| |
Abstract
Class
Abstract
class is used to specify that a class is not
to be instantiated, but rather inherited by
other classes. An abstract class provides a
base for someone to extend an actual class.
An abstact class is deliberatesly missing some
or all of the method bodies. An abstract class
can have abstract methods that are not implemented
in the abstract class, but in subclasses. You
can't use new on abstract classes, but you can
use abstract references, which always point
to some extension of the abstract class. Unlike
interfaces, abstract classes may implement some
of the methods. Though you can't instantiate
an abstract class, you can invoke its static
methods.
Because an abstract class is not fully defined
you cannot declare abstract constructors, or
abstracr static methods. Any subclass of an
abstract class must either implement all of
the abstract methods in the superclas or be
itself declared abstract.
|
|