I have an object and this object also includes other objects, like this
Student :
public class Student implements Cloneable {
public int id;
public String name;
public List<Integer> score;
public Address address;
......
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
}
Address :
public class Address implements Serializable,Cloneable{
public String type;
public String value;
......
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
}
Now i have a List\<Student> studentsList
How can I deep copy studentsList?How can I copy studentsList if there are other objects in Address?