Oleg Varaksin
Sep 27, 2024

What is the point of this article? I believe it's clear for everyone that you can not compare non-primitive objects by refetence to test if the values of such objects are equal. Objects should be compared by equals() or Objects.equals(). I prefer Objects.equals() because it's safe if one or both objects are null.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Oleg Varaksin
Oleg Varaksin

Written by Oleg Varaksin

Thoughts on software development. Author of “PrimeFaces Cookbook” and “Angular UI Development with PrimeNG”. My old blog: http://ovaraksin.blogspot.de

Responses (2)

Write a response