O'Reilly logo

PURE Java™ 2 by Kenneth Litwak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required