Duration ofMinutes(long minutes) example
Description
Duration ofMinutes(long minutes)
creates a Duration
representing a number of standard minutes.
Syntax
ofMinutes
has the following syntax.
public static Duration ofMinutes(long minutes)
Example
The following example shows how to use ofMinutes
.
import java.time.Duration;
/* w ww. java 2s. c o m*/
public class Main {
public static void main(String[] args) {
Duration duration = Duration.ofMinutes(10);
System.out.println(duration);
}
}
The code above generates the following result.