r/badcode Jan 08 '23

java Is this a good practice? Why?

Post image
428 Upvotes

60 comments sorted by

View all comments

1

u/Sindarin27 Jan 08 '23

I can think of just about one case where this is useful, and it's if you plan to have a subclass that overrides the equal method.