请问Java Point类是描述的一个点吗还是说是一条线
应该是一个点类,点类有x,y坐标。
class Point{
private double x = 0, y = 0;
public Point() {
this.x = 0;
this.y = 0;
}
public Point(double x , double y) {
this.x = x;
this.y = y;
}
public double getX() {
return x;
}
public void setX(double x) {
this.x = x;
}
public double getY() {
return y;
}
public void setY(double y) {
this.y = y;
}
}