A Lesson in Objects

As you work, you interact with objects all the time. Phones, computers, fax machines, handheld devices, and cars are all examples of objects in the real world. When you deal with these objects, you don't separate an object from its attributes and its operations. For example, when you drive your car, you don't think about its attributes (such as its current speed of travel) apart from the operations (such as accelerating in response to increased pressure on the gas pedal). You put your car in gear, adjust the speed using the gas pedal, and drive. Every aspect is part of a single, cohesive package.

By using object-oriented programming, you can approach the same simplicity of use. A structured programmer is accustomed to creating ...

Get Special Edition Using Java 2 Standard Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.