aspose file tools*
The moose likes Java in General and the fly likes Diffarence between shallow copy and deep copy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Diffarence between shallow copy and deep copy" Watch "Diffarence between shallow copy and deep copy" New topic
Author

Diffarence between shallow copy and deep copy

sarma kiran
Ranch Hand

Joined: Jul 17, 2008
Posts: 30
Hi,
Can any one tell me what is the diffarence between Shallow copy and Deep copy with examples.
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1

http://www.javaworld.com/javaworld/javatips/jw-javatip76.html

Cheers,
Raj.
Praveen Kumar
Ranch Hand

Joined: Nov 06, 2006
Posts: 133
Shallow copy object and original objects share the member variables.
Object's clone method will do shallow copy.

Where as in deep copy deep copy object and original object will its own member variables. We can get this one by seralisation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Diffarence between shallow copy and deep copy