Originally posted by Pavel Halas:
Everything's right except this. DEEP COPY is the right term.
I think we all need to get on the same page here. I assume we are discussing Object.clone() and the Cloneable interface. Object.clone() returns a
shallow copy. It just copies every field in the object to the cloned copy. If all the references are immutable then you will in fact have a
deep copy or if the class' state consists of immutabales and/or primitives only. Also note that Object itself is not Cloneable. When you make a class Cloneable, chances are you will want to override the clone() method in Object and provide one that will create a deep copy of the object.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher