mp.x代表的是什么

class Mypoint{
​double x,y;
​public Mypoint(double x,double y) {
​​this.x = x;
​​this.y = y;
​}
​public double distance(Mypoint mp) {
​​double x1 = this.x - mp.x;
​​double y1 = this.y - mp.y;
​​double tmp = x1y1 + y1y1;
​​return Math.sqrt(tmp);
​}
}

class Test{
​public static void main(String[] args) {
​​Mypoint p1 = new Mypoint(3,4);
​​Mypoint p2 = new Mypoint(8,9);
​​System.out.println("两点之间的距离为: "+p2.distance(p1));
​}
}

Mypoint mp,这是一个Mypont类的x坐标,计算2个点之间的距离。通过
System.out.println("两点之间的距离为: "+p2.distance(p1));语句实现。
mp其实就是p2.distance(p1)这条语句的p1变量。