|
-
September 12th, 2005, 10:58 PM
#2
Re: clone method
Hi,
An Object's implementation of Clone method checks to see whether the object on which clone was invoked implements the Cloneable interface.
If the object does not, the method throws a CloneNotSupportedException.
If the object on which clone was invoked does implement the Cloneable interface, Object's implementation of the clone method creates an object of the same type as the original object and initializes the new object's member variables to have the same values as the original object's corresponding member variables.
So the correct answer must be (A)
Happy coding
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|