Topic: 对clone不太懂,高手大大作答一下

  Print this page

1.对clone不太懂,高手大大作答一下 Copy to clipboard
Posted by: yangjx
Posted on: 2004-12-19 21:27

object.clone()是对调用该方法的对象进行克隆.
以下代码:
public class Myclass extends Herclass implements Cloneable{
public Object clone()throws CloneNotSupportedException{
return super.clone();
}
//...
}

如果实例化该继承类,执行clone方法,它返回的是父类的引用吗?
怎么来理解比较好?THANK YOU!

2.Re:对clone不太懂,高手大大作答一下 [Re: yangjx] Copy to clipboard
Posted by: caike
Posted on: 2004-12-20 09:24

关注。
希望高手解释一下

3.Re:对clone不太懂,高手大大作答一下 [Re: yangjx] Copy to clipboard
Posted by: yanyangtian
Posted on: 2004-12-20 13:04

应该是吧


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923