Java tutorial
import java.util.Date; public class Main { public static void main(String[] args) { // create a date Date date = new Date(); // clone it to a second date Object date2 = date.clone(); // print the results System.out.println("Original Date:" + date.toString()); System.out.println("Cloned date :" + date2.toString()); } }