Javatpoint Logo
Javatpoint Logo

Java Date getSeconds() Method

The getSeconds() method of Java Date class returns the value between 0 to 61 which represents the second of the past minute and second of the minute is represented by this date object.

This method is deprecated as of JDK version 1.1 and replaced by Calender.get(Calender.SECOND)

Syntax:

Parameters

NA

Return

It returns the second of the past minute represented by this date object.

Example 1

Test it Now

Output:

Second of the minute is  : 53

Next TopicJava Util Date




Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA