Skip to content

Technology Quote by Joshua Bloch

“A second advantage of static factory methods is that, unlike constructors, they are not required to create a new object each time they're invoked.” quote by Joshua Bloch
Download Open image
““A second advantage of static factory methods is that, unlike constructors, they are not required to create a new object each time they're invoked.””

Joshua Bloch

About This Quote

Source Book: Effective Java, 3rd ed., 2018

Static factories give flexibility, allowing object reuse and naming clarity unlike constructors.

In simple terms: Static factories offer flexible object creation.

Key Takeaway

Prefer static factories for clearer, reusable instances.

Themes

software design object creation flexibility performance clarity

Mood

analytical practical

Type

technical educational

When to use this quote

  • library development
  • enterprise applications
  • resource management
  • testing

Key Concepts

factory pattern encapsulation API design

Questions to Reflect On

  • When would you choose a constructor over a static factory?
  • How does naming improve API usability?
A Different Perspective

Static factories can obscure class hierarchy if overused.

2.3 out of 5 (5 ratings)

More by Joshua Bloch

Explore all 9 Joshua Bloch quotes

More Technology quotes

Browse all 18,165 Technology quotes