Javatpoint Logo
Javatpoint Logo

Java Date clone() Method

The clone() method of Java Date class returns a copy/clone of this object. This method overrides clone in class Object.

Syntax:

Parameters

NA

Return

It returns a clone/copy of this instance.

Example 1

Test it Now

Output:

Clone of your Date 'd' : Mon Oct 21 00:00:00 IST 3918

Example 2

Test it Now

Output:

Clone of your Date 'd' : Sat Apr 10 00:00:00 IST 3897

Next Topicjava.util.Date




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA