Javatpoint Logo
Javatpoint Logo

Java Date setMinutes() Method

The setMinutes() method of Java Date class sets the minutes of the hour of this date object to the given value. It changes the previous minutes of the hour value to the newly specified value.

This method is deprecated as of JDK version 1.1 and replaced by Calendar.set(Calendar.MINUTE, int minutes).

Syntax:

Parameters

The parameter 'minutes' represents the minute value between 0-59.

Return

NA

Example

Test it Now

Output:

Old minute value is: 56
The Minute value after setting is: 10

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