Q68
Which one of the following is the right way to clone an object?
A.
_clone(targetObject);
B.
destinationObject = clone targetObject;
AnswerC.
destinationObject = _clone(targetObject);
D.
destinationObject = clone(targetObject);
Answer: Option B
Solution
Answer: Option B
Solution:
You can clone an object by prefacing it with the clone keyword.