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?
 public boolean equals(Object obj) {
        if (obj == null || obj.getClass() != this.getClass()) {
            return false;
        }
        Coor temp = (Coor) obj;
        if (temp.x == this.x && temp.y == this.y) {
            return true;
        } else {
            return false;
        }
    }
 
     
     
     
     
     
     
     
    