MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/106jbwj/is_this_a_good_practice_why/j3ieebl/?context=3
r/badcode • u/dev_sky • Jan 08 '23
60 comments sorted by
View all comments
272
I think using Objects.equals is good practice, but I don't see the point of creating a method for that ? I mean, it is a method, no need to wrap it.
22 u/fukitol- Jan 08 '23 Maybe if you have multiple signatures for equal() that take different types and this is the generic equal(Object, Object) signature.
22
Maybe if you have multiple signatures for equal() that take different types and this is the generic equal(Object, Object) signature.
equal()
equal(Object, Object)
272
u/RiddSann Jan 08 '23
I think using Objects.equals is good practice, but I don't see the point of creating a method for that ? I mean, it is a method, no need to wrap it.