ZoneOffset ofHoursMinutes(int hours, int minutes) example
Description
ZoneOffset ofHoursMinutes(int hours, int minutes)
creates
an instance of ZoneOffset using an offset in hours and minutes.
Syntax
ofHoursMinutes
has the following syntax.
public static ZoneOffset ofHoursMinutes(int hours, int minutes)
Example
The following example shows how to use ofHoursMinutes
.
import java.time.ZoneOffset;
//from ww w.j a v a2s . c om
public class Main {
public static void main(String[] args) {
ZoneOffset t = ZoneOffset.ofHoursMinutes(1,20);
System.out.println(t);
}
}
The code above generates the following result.