Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

composition

Building a class from other objects held in its fields.

A has-a relationship; the outer class uses the inner object through its public methods and exposes only what it chooses.

Examples

  • class Car { private final Engine engine; ... } has an engine instead of being one.

Read the full section →