What Are Classes?

Classes are the building blocks of an object-oriented system, so it's important to define them and talk about how they relate to objects before you learn to declare and use them. On one hand, objects are relatively easy to define because they surround you. Obviously, this book you're reading and the keyboard on which you type are both objects. The concreteness of objects makes the concept simple to grasp—objects are specific things (persons, places, ideas, and so on if you want to be complete). Turning to classes, however, you must trade this concrete view for the abstract.

In nearly every aspect of life, from simple conversation to scientific research, people have found it easier to understand objects and work with them after ...

Get Special Edition Using Java 2 Standard Edition 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.