Which exception can the clone()
method of the Object class throw?.
Select the one correct answer.
(a) CloneNotSupportedException (b) NotCloneableException (c) IllegalCloneException (d) NoClonesAllowedException
(a)
The clone()
method of the Object class will throw a CloneNotSupportedException if the class of the object does not implement the Cloneable interface.