Java - Cloning
Cloning:
It is
used to copy the exact object into another object.
Java.lang.Cloaneable
interface must be implement by that class.
Example:
1. Student18 s1=new Student18(101,"amit");
2. Student18 s2=(Student18)s1.clone();
Comments
Post a Comment