LocalDateTime plusMinutes(long minutes) example
Description
LocalDateTime plusMinutes(long minutes)
returns a copy of this
LocalDateTime with the specified period in minutes added.
Syntax
plusMinutes
has the following syntax.
public LocalDateTime plusMinutes(long minutes)
Example
The following example shows how to use plusMinutes
.
import java.time.LocalDateTime;
/*w w w. j a v a 2s .com*/
public class Main {
public static void main(String[] args) {
LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00);
LocalDateTime t = a.plusMinutes(100);
System.out.println(t);
}
}
The code above generates the following result.