使用clone出错,为什么 出错信息:exercise.java:unreported exception java.lang.CloneNotSupportedExdeption;must be caught or declared to be thrown at line 7,column 30 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //捕获CloneNotSupportedExceptiontry { exercise s2=(exercise)s1.clone();} catch (CloneNotSupportedException ex) { System.out.println("class exercise don't support clone");}//要实现Clone,需要实现Cloneable接口public class exercise implements Cloneable { //TODOcomplete me!} 关于java中的vector的设计 如何获取本地有多少磁盘? 异常抛出问题!! 请问public static void main(String[] args)的意义 如下这段代码怎么解释?实现什么功能? JPanel的JScrollPane下拉后也不能完全显示新增的控件 一个关于new 的问题..请大家帮我看看 websphere的小问题 java基础类的静态函数为什么在多线程下不出问题? 在servlet中如何调用jsp和html?谢谢 如何得到JAVA_HOME 散分
try {
exercise s2=(exercise)s1.clone();
} catch (CloneNotSupportedException ex) {
System.out.println("class exercise don't support clone");
}
//要实现Clone,需要实现Cloneable接口
public class exercise implements Cloneable {
//TODOcomplete me!
}