Java Programing laungage

java.util Projects

java.util Project 1

Clone method Implementation

In this page of the tutorials we are going to learn that how to implement to the Clone() method in the java application for the understanding we are taking an example in which we shall use the clone() method.

Previous Home Next

The Cloneable interface defines a method called Clone(), which can be used to clone an object in your java program. If we are trying to use the clone method in a class where Cloneable interface is not implemented, it throws CloneNotSupportedException. Clone() method is used to create and return copy of the object.

Example

Previous Home Next