Skip to content

Technology Quote by Eric Freeman

“Two objects are equal only if the variables containing the object references point to the same object.” quote by Eric Freeman
Download Open image
““Two objects are equal only if the variables containing the object references point to the same object.””

Eric Freeman

About This Quote

Source Book: "Head First Design Patterns" by Eric Freeman, 2004

Objects are considered equal only when they reference the exact same memory location.

In simple terms: Equality requires identical object references.

Key Takeaway

Use reference equality checks.

Themes

programming object orientation equality

Mood

technical instructional

Type

educational explanatory

When to use this quote

  • debugging code
  • designing APIs
  • teaching OOP

Key Concepts

reference vs value equality identity software design

Questions to Reflect On

  • When should you use value equality?
  • What problems arise from reference checks?
A Different Perspective

Sometimes logical equality is needed instead of reference equality.

3.3 out of 5 (9 ratings)

More by Eric Freeman

Explore all 90 Eric Freeman quotes

More Technology quotes

Browse all 12,247 Technology quotes