Section 8.8 Composition

• A class can have references to objects of other classes as members. This is called composition (p. 332) and is sometimes referred to as a has-a relationship.

Get Java™ How To Program (Early Objects), Tenth 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.