Javatpoint Logo
Javatpoint Logo

Java Date getTime() Method

The getTime() method of Java Date class returns the number of milliseconds since January 1, 1970, 00:00:00 GTM which is represented by Date object.

Syntax:

Parameters

NA

Return

It returns the number of milliseconds since January 1, 1970, 00:00:00 GTM.

Example

Test it Now

Output:

Number of milliseconds science January 1, 1970, 00:00:00 GTM : 60818841000000

Next Topicjava.util.Date





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA