编写Point类,有两个属性x、y,一个方法distance(Point p1,Point p2),计算二者之间的距离

public class Point { private double x; private double y; public Point() {} public Point(double x,double y) { this.x = x; this.y = y; } public static double distance(Point p1,Point p2) { r
相关文章
相关标签/搜索