使用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模拟登陆问题,期待明白人给讲解一下 如何利用链表发送套接字 ireport 能设计出可以打印带checkbox的报表模版吗? 关于字符集的问题 看了那么多关于乱码的贴,好象都和我的不同,我的是有中文的java源程序编译不了,昨办? 打包的jar文件可否设置里面各包的先后顺序? 怎么不显示JTable的垂直滚动条? 关于环境变量设置问题 请问这样一个窗体我应该怎么布局? 如何得到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!
}