please explain about cloneable interface
java
Collapse
X
-
Tags: None
-
Check out the index article in the Java Articles section. At the end a link isOriginally posted by santoshmiracleplease explain about cloneable interface
supplied to the API documentation. The Object class contains an elaborate
explanation about the clone() method and the Cloneable interface.
kind regards,
Jos
ps. please make up a better subject title next time -
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.Originally posted by santoshmiracleplease explain about cloneable interface
Attempts to clone instances that do not implement the Cloneable interface result in the exception CloneNotSupport edException being thrown.Comment
Comment