December 1999
Intermediate to advanced
816 pages
20h 27m
English
public abstract interface Cloneable
This interface is used to indicate that the class can have its instances cloned. The clone() method, inherited from Object, is valid, although typically a user-defined class will need to define its own version of clone() to provide the behavior desired for copying an entire object with a deep copy. A deep copy is the process of copying all the fields of all the dependent objects of a given object being copied. If you have a class that contains a GregorianCalendar object, a deep copy would copy the object, instantiate a new GregorianCalendar object for the copied object, and copy all the fields from the GregorianCalendar object that is being copied. In general, ...
Read now
Unlock full access