so shallow is just assign a reference , am I right
登录 | 论坛导航 -> 华新鲜事 -> 技术の宅 | 本帖共有 2 楼,分 1 页, 当前显示第 1 页 : 本帖树形列表 : 刷新 : 返回上一页
<<始页  [1]  末页>>
作者:门中木 (等级:3 - 略知一二,发帖:1418) 发表:2006-04-10 22:00:50  楼主  关注此帖
I didnt make my statement clear enufin this case, a shallow clone will make an extra copy of Vector object. ( only container object is copied) however, a deep clone will create memory for Vector object and all String objects inside this Vector. ( container and contained objects are all duplicated)
so shallow is just assign a reference , am I right
一切坚固的东西都烟消云散,一切神圣的东西都被亵渎,人们最后不得不清醒地面对生活的真实状况以及他们之间的关系。
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
作者:门中木 (等级:3 - 略知一二,发帖:1418) 发表:2006-04-13 00:04:36  2楼
[java] how to cast after clone()? Vector a= new Vector(); Vector b= a.clone(); //1. Vector b=(Vector) a.clone();//2. Vector b=(Vector) a. clone(); //3 i have tried all the three ways of casting, but all of them will produce either an error or a warning. Can anyone suggest how to do casting in this case? thanks a lot in advance!
1.5的东东比1.4变了好多,搞的连java也不会写了^_^
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
论坛导航 -> 华新鲜事 -> 技术の宅 | 返回上一页 | 本主题共有 2 篇文章,分 1 页, 当前显示第 1 页 | 回到顶部
<<始页  [1]  末页>>

请登录后回复:帐号   密码