Sail E0 Webinar
Question
Which one of the following is the right way to clone an object?
Options:
A .  _clone(targetObject);
B .  destinationObject = clone targetObject;
C .  destinationObject = _clone(targetObject);
D .  destinationObject = clone(targetObject);
Answer: Option B


You can clone an object by prefacing it with the clone keyword.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers