Java Calendar getTime() MethodThe getTime() method of java.util.Calendar class is a final method. This method gets the time value of calendar object and returns the date. SyntaxParameterNo parameter is passed. ReturnsReturns a date which represents time value of calendar object. ThrowsDoes not throw exception. Example 1Output: Date :Sat Nov 23 00:00:00 PST 1996 new Date is :Mon Jan 25 00:00:00 PST 1999 Example 2Output: Date :Wed Aug 08 21:33:33 PDT 2018 new Date is :Mon Oct 07 21:33:33 PDT 1996 Next TopicJava-calendar-gettimezone-method |
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