传入point类的一个对象point p1=new point(1.0,2.0);
point p2=new point(p1)p2.x将等于p1.x, p2.y=p1.x
相当于拷贝的作用

解决方案 »

  1.   

    相当于就是复制一个复本,没什么可奇怪的。连String都有类似的构造函数public String(String original)
    Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string. Unless an explicit copy of original is needed, use of this constructor is unnecessary since Strings are immutable.
      

  2.   

    请详解第二个构造函数final point oldpoint的意义 在这里可以理解成  1.oldpoint作为一个参数
                      2.它不能有其它的改动.不能指向其它的对象!
      

  3.   

    相当于生成oldpoint的一个复制版本,
      

  4.   

    给的参数类型不同,调用的POINT方法也就不同。