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




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA