class guodong{
String name;
public guodong(String name){
this.name = name;
}
}
class info implements Cloneable{
int age = 22;
guodong Address ;
public info(int a){
this.age = a;
this.Address = new guodong("guodong");
}
public info clone() throws CloneNotSupportedException
{
return (info)super.clone();
}
}
public class CloneTest {
public static void main(String[] args) throws CloneNotSupportedException {
info guo = new info(22);
info guoguo = guo.clone();
System.out.println(guo == guoguo );
System.out.println(guo.Address == guoguo.Address);
}
}