OffsetTime withMinute(int minute) example
Description
OffsetTime withMinute(int minute)
returns a copy of this OffsetTime with the minute-of-hour value altered.
Syntax
withMinute
has the following syntax.
public OffsetTime withMinute(int minute)
Example
The following example shows how to use withMinute
.
import java.time.OffsetTime;
/* w ww . jav a2s. c o m*/
public class Main {
public static void main(String[] args) {
OffsetTime m = OffsetTime.now();
OffsetTime n = m.withMinute(34);
System.out.println(n);
}
}
The code above generates the following result.