C H A P T E R  6

Object-oriented Programming

Java is an object-oriented language. That means that Java lets programmers develop software by developing objects and specifying the relationships between the objects. The relationships are defined within the objects, so the objects are the central focus of any software development effort in Java.

Objects

So what's an object? In technical terms, an object is an instance of a class (or the class itself if it's static or a singleton—that is, a class of which there can be only one instance). So what exactly is an instance? Think of it this way: A class definition is the definition for an instance, and a particular item defined by that class is an instance. Suppose we have a class that defines documents ...

Get Java 7 for Absolute Beginners 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.