0

im trying to override the equals method but keep getting the error "the method equals(point) of type point must override or implement a supertype method". im rewriting equals to determine whether two points have the same x and y values. this makes me confused because aren't i doing what the error says i am not?

@Override
  public boolean equals(Point p){
    if(this.getx()==p.getx()&&this.gety()==p.gety()){
      return true;
    }else 
      return false;
  }

please give me your wisdom kind internet folk

0 Answers0