A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Java in General
Diffarence between shallow copy and deep copy
Joined: Jul 17, 2008
Aug 14, 2008 05:14:00
Can any one tell me what is the diffarence between Shallow copy and Deep copy with examples.
Joined: Mar 02, 2005
Aug 14, 2008 05:24:00
Joined: Nov 06, 2006
Aug 20, 2008 01:45:00
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:
subject: Diffarence between shallow copy and deep copy
Difference between Shallow copy and Deep Copy in Java
shallow copy and deep copy
Cloneable and deep copy.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014