This is my implementation of the equals class for a Coor class which is just contains 2 ints x and y. would this be the proper way of implementing this method?
Here’s a more straightforward way:
public boolean equals(Object other) { return other instanceof Coor && ((Coor) other).x == x && ((Coor) other).y == y }