publicclassCloneTestimplementsCloneable{
int num;//基本类型
Integer num2;//包装类型
Test4 t =newTest4();//引用类型publicstaticvoidmain(String[] args)throws CloneNotSuppor
Object的clone方法的使用测试众所周知,clone()属于浅拷贝,那么浅拷贝到底是拷贝了什么,与深拷贝有什么区别呢?以下为测试代码public class CloneTest implements Cloneable{ int num;//基本类型 Integer num2;//包装类型 Test4 t = new Test4();//引用类型 public static v...