point.java
来自「输入两个点的坐标」· Java 代码 · 共 40 行
JAVA
40 行
public class Point {
private double x;
private double y;
public Point(){
x = 0;
y = 0;
//System.out.println("Point(){} Constructor!");
}
public Point (double x,double y) {
this.x = x;
this.y = y;
}
public Point(Point p) {
this.x = p.GetX();
this.y = p.GetY();
}
public void SetX (double X){
this.x = X;
};
public void SetY (double Y){
this.y = Y;
};
public double GetX (){
return this.x;
}
public double GetY (){
return this.y;
}
public boolean Check(){
if (x>0) {
if (y>0) {
return true;
}
else return false;
}
return false;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?