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
|