How should Deep Copy Work?
<p>OK when doing a deep copy obviously references should not be copied. However, if the object being copied contains objects that themselves are references to to the same object should that be maintained or should the data just be copied.</p>

<p>Example</p>

<pre><code>public class Program() {
    public void Main(String[] args) {
        Person person = new Person();
        person.setName("Simon");

        List&lt;Person&gt; people = new ArrayList&lt;Person&gt;();
        people.add(person);
        people.add(person);
        people.add(person);

        List&lt;Person&gt; otherPeople = magicDeepCopyFunction(people);

        otherPeople.get(0).setName("Adam");

        // should this output 'Adam' or 'Simon'?
        System.out.println(otherPeople.get(1)); 
    }
}
</code></pre>

<p>I can see arguments for both but I am wondering what the consensus was.</p>
