Interface Cloneable<T extends Cloneable<T>>
- Type Parameters:
T- the type of objects that this class can clone
- All Known Implementing Classes:
public interface Cloneable<T extends Cloneable<T>>This interface is implemented by objects that can be cloned.
This interface also overcomes the drawback of
Cloneableinterface which doesn't have a clone method. Josh Bloch (a JDK author) has pointed out this in his book "Effective Java" as Override clone judiciously
T getClone()Creates and returns a copy of this object.
The precise meaning of "copy" may depend on the class of the object. The general intent is that, all fields of the object are copied.
- a clone of this object.