View Single Post
Old 11-04-2003, 03:30 PM   #14 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,161
Belisarius is on a distinguished road
Shallow copies and deep copies are terms used when cloning. You can do what you're describing with immutables like Strings, but most Objects you can't, you'll be passing around the Object reference. I know because I recently had that problem and had to implement cloning of Objects. If you say "Object x = y;", 'x' and 'y' are the same object.
__________________
GitS
Belisarius is offline   Reply With Quote