try Vector<String> b = new Vector<String>(a);
登录 | 论坛导航 -> 华新鲜事 -> 技术の宅 | 本帖共有 1 楼,分 1 页, 当前显示第 1 页 : 本帖树形列表 : 刷新 : 返回上一页
<<始页  [1]  末页>>
作者:绿竹幽径 (等级:2 - 初出茅庐,发帖:27) 发表:2006-04-06 19:07:38  楼主  关注此帖
[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!
try Vector<String> b = new Vector<String>(a);
try this

Vector<String> b = new Vector<String>(a);
Winners never quit and quitters never win!
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
论坛导航 -> 华新鲜事 -> 技术の宅 | 返回上一页 | 本主题共有 1 篇文章,分 1 页, 当前显示第 1 页 | 回到顶部
<<始页  [1]  末页>>

请登录后回复:帐号   密码