Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 2
    Forgetting or being unable to update Person.deepCopy are non-issues by comparison. That is, you can face very similar issues with the clone alternative. For instance, if someone creates a new "class Administrator extends Person", he will have to remember to implement Administrator.clone (assuming a field-by-field copy does not perform a deep copy). Not being able to update Person.deepCopy can be handled by overriding it in the subclass. And yes, you do have to remember to do this, but again that's the same issue with the clone alternative. Commented Nov 16, 2010 at 22:09