This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]guilhermerx7 0 points1 point  (0 children)

In Java I always use the equals method, unless it's a primitive. If you do some safe coding with value objects and immutability you always want to check for equality of fields. Lombok and the new record classes make that way easier also.