The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002

Advertisement

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:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us