Mohamed Taman: Java: What is object deep copy and how it can be achieved in Java ?
If you need to copy and object, you can do it in Java using clone method that is member method of Object class, which is all objects parent class in Java. But wait, clone method performs a shallow copy not a deep copy. In deep copy the object is copied along with the objects it refers to. Deep clone copies all the levels of the object from top to the bottom recursively... When a deep copy of the object is done new references are created. One solution is...