Such functionality might include startup and shutdown tasks, which are often application-dependent. So instead of trying to define that behavior itself, the abstract base class can declare abstract shutdown and startup methods. When it is time to start up, the abstract class can call the startup method. When the base class calls this method, Java calls the method defined by the child class. Many developers forget that a class that defines an abstract method can call that method as well.
Abstract classes are an excellent way to create planned inheritance hierarchies.
They're also a good choice for nonleaf classes in class hierarchies. About the author Tony Sintes is a principal consultant at BroadVision . Tony, a Sun-certified Java 1.1 programmer and Java 2 developer, has worked with Java since 1997.