调用部分应该传入参数值
public class PointTest{public static void main(){Point stu = new Point(3, 4);stu.distance();}}
你eclipse运行能正常得到结果吗输出结果时,将println换成print