Skip to content

Composition Quote by Joshua Bloch

“Favor composition over inheritance,” quote by Joshua Bloch
Download Open image
“Favor composition over inheritance,”

Joshua Bloch

About This Quote

Source Book: Effective Java, 2nd Edition, 2008

Prioritize designing code by composing smaller, reusable components rather than relying on inheritance hierarchies.

In simple terms: Prefer composition over inheritance in code design.

Key Takeaway

Use composition for flexible, maintainable software.

Themes

software design object‑oriented programming best practices

Mood

practical educational

Type

technical instructional

When to use this quote

  • API design
  • refactoring
  • team collaboration
  • system architecture

Key Concepts

composition inheritance code reuse

Questions to Reflect On

  • When might inheritance be justified?
  • How does composition improve testability?
A Different Perspective

Inheritance can create rigid, fragile structures.

2.7 out of 5 (7 ratings)

More by Joshua Bloch

Explore all 9 Joshua Bloch quotes

More Composition quotes

Browse all 739 Composition quotes