public class Point2D {
protected double x, y;
public Point2D(double x, double y) {
this.x = x;
this.y = y;
}
public Point2D() {
this(0, 0);
}
public String toString() {
return "(" + x + ", " + y + ")";
}
public boolean equals(PointDD p) {
return x == p.x && y == p.y;
}
public double getDistance() {
return Math.sqrt(x * x + y * y);
}
public boolean isZero() {
return getDistance() == 0;
}
}类名显示The Type is already defined
如何解决