Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
don't really understand
Posted by Chin Loong on January 20, 2002 at 3:03 PM
[snip] > To add a few thoughts on this part, the behaviour of clone() is entirely dependant on how the method is implemented. For example, if the class implementing clone() has an instance of another class, the member object's clone() method (if present at all)is not called by default. Unless an explicit call to clone() is made to the member object, both the clones refer to the same member object! [/snip] both the clone() ? both of which clone(), since your statement includes this phrase "unless an explicit call to clone() is made to the member object"? and both refer to which member object?
Replies:
- Cloning Matt Gerrans January 20, 2002 at 4:08 PM
(3)
|