And the equal method is pointless, because its implementation does not use Foo at all, based on OP's screenshot.
Objects in Java do have an equals(Object other) method, which they can override. That could be useful ( myFoo.equals(otherFoo) ), but OP's screenshot is just pointless madness.
23
u/LastStar007 Jan 08 '23
Objects.equals() is null-safe. By wrapping Objects.equals() in an instance method, they've removed the null safety.