LocalTime getSecond() method in Java with Examples
The getSecond() method of a LocalTime class is used to return the second-of-minute field. This method returns an integer value ranging from 0 to 59, i.e. the Seconds of a minute.
public int getSecond()
Parameters: This method does not accept any parameter.
Return value: This method returns an integer value which represents second-of-minute and it ranges from 0 to 59.
Below programs illustrate the getSecond() method:
Second Field: 50
Second Field: 30