public class Mypoint 
{
    double x, y;public Mypoint( double x0, double y0 )
{
x = x0;
y = y0;
}
double distance( Mypoint p ){
return Math.sqrt( ( x - p.x) * (x - p.x ) + (y-p.y) * (y-p.y) );
}
public static void main(String[] args) {
Mypoint a = new Mypoint( 3, 4 );
Mypoint b = new Mypoint( 8, 9 );
System.out.println( a.distance( b ));
}
}主要是实现计算两个点之间的距离,但double distance( Mypoint p )这句不懂是什么意思,该怎么使用这种类型的代码?该怎么解释?distancejava