up previous next contents
Next: Cloning objects Up: Extending Classes Previous: Anonymous classes   Contents

Abstract Classes and methods

  • Helpful when some of the behavior is defined for most objects of a given type, but some behavior makes sense for only particular classes and not the superclass.
  • Declare classes that define only part of an implementation.
  • Each method not implemented in an abstract class is marked abstract.
  • A class with any abstract methods must be declared abstract.
  • Abstract methods must be implemented by subclasses that are not abstract themselves.


up previous next contents
Next: Cloning objects Up: Extending Classes Previous: Anonymous classes   Contents