摘要:
http://www.itzhai.com/java-based-notebook-the-object-of-deep-and-shallow-copy-copy-copy-implement-the-cloneable-interface-serializing-deep-deep-copy.html 阅读全文
摘要:
Cloneable接口声明中没有指定要实现的方法,一个类要实现Cloneable,最好是覆盖Object类的clone()方法。1. 如果类没有实现Cloneable接口,调用类对象的clone方法抛出CloneNotSupportedException。Java代码publicclassCloneableTest{publicstaticvoidmain(String[]args)throwsCloneNotSupportedException{CloneableTesttest=newCloneableTest();Objectobj=test.clone();}}结果是抛出CloneNo 阅读全文
摘要:
原地址 http://blog.csdn.net/gideal_wang/article/details/4316691 阅读全文