I want to copy/clone a list of Objects:
// copy reference
s.setNames(s1.getNames());
how can I copy the value instead of the reference?
Is that right?:
// copy Value instead of reference
s.setNames(new ArrayList<Name>(s1.getNames));
Or is there a other way?
// copy reference
s.setNames(s1.getNames());
how can I copy the value instead of the reference?
Is that right?:
// copy Value instead of reference
s.setNames(new ArrayList<Name>(s1.getNames));
Or is there a other way?