Calendar computeTime() method in Java with Examples
The computeTime() method in Calendar class is used for the conversion operation of the current calendar field values in fields to the millisecond time value time.
protected abstract void computeTime()
Parameters: The method does not take any parameters.
Return Value: The method does not return any value.
Below programs illustrate the working of computeTime() Method of Calendar class:
The Current date is: Wed Feb 13 16:27:12 UTC 2019 The recent date is: Fri Jan 01 00:00:00 UTC 2016
The Current date is: Wed Feb 13 16:27:15 UTC 2019 The recent date is: Sat Jan 01 00:00:00 UTC 2000
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.