Chapter 16. Abstract Classes

DO OR DIE

  • Clean my room.

  • Take out the trash.

  • Double RAM in server.

  • Take over the world by ruling a race of mindless robots that I control through my Tivo.

An abstract class is mostly potential. A regular class must implement all of the methods it declares. An abstract class can implement some of the methods it declares, and leave some for a subclass to implement.

The abstract class can be a useful thing. In this topic, we'll take a look at what they are, how to write them, how they behave, and when to use them.

Get Java Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.