Cloning and assigning??
posted 14 years ago
You always assign references to objects. In your example, obj and obj1 are referencing the same object, that is, if you call a method on obj1 it is the same as calling a method on obj. Therefore, if you want to work on a copy of an object, you have to clone it like you did for obj2.