O'Reilly logo

Sams Teach Yourself Java™ 6 in 21 Days by Laura Lemay, Rogers Cadenhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Serializing and Examining Objects

An essential concept of object-oriented programming is the representation of data. In an object-oriented language such as Java, an object represents two things:

  • Behavior—The things an object can do

  • Attributes—The data that differentiates the object from other objects

Combining behavior and attributes is a departure from other programming languages where a program is defined as a set of instructions that manipulate data. The data is a separate thing, as in word processing software. Most word processors are considered programs used to create and edit text documents.

Object-oriented programming blurs the line between program and data. An object in a language such as Java encapsulates both instructions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required