Java Date clone() MethodThe clone() method of Java Date class returns a copy/clone of this object. This method overrides clone in class Object. Syntax:ParametersNA ReturnIt returns a clone/copy of this instance. Example 1Test it NowOutput: Clone of your Date 'd' : Mon Oct 21 00:00:00 IST 3918 Example 2Test it NowOutput: Clone of your Date 'd' : Sat Apr 10 00:00:00 IST 3897 Next Topicjava.util.Date |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India