Task 2 of 5 · 0 solved · 5 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

7.3 Object and equals — override equals

Total: 0 / 4 pts
Practice mode — check each part and get hints as you go.
Task

Complete Point by overriding equals so that two points with the same coordinates count as equal.

The parameter type must be Object — that is the signature being overridden. Check the type first, then compare.

The program prints false (different objects), true (same contents), false (not a Point at all).

Your solution