Interface and Class Details
Interface Cloneable
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, ...
Get PURE Java™ 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.