Home Segments Top Top Previous Next

Chapter 9:

How to Create Class Instances

To remember the characteristics of a particular movie, you may think naturally in terms of the quality of the script, of the acting, and of the direction. To describe the characteristics of a particular symphony, you may think naturally in terms of the quality of the music, of the musician's performances, and of the conducting.

If you express quality on a numeric scale, then the numbers that describe a particular movie or symphony constitute a natural bundle—a bundle of three numbers for each individual that belongs to the movie category, or of three for each individual that belongs to the symphony category.

In this chapter, you learn that one of Java's great virtues is that Java offers you the means to describe, construct, and manipulate bundles of descriptive data items that mirror real-world individuals and categories. These special mechanisms distinguish object-oriented programming from traditional programming.