OffsetTime of(int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset) example
Description
OffsetTime of(int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset)
creates an instance of OffsetTime from an hour, minute, second and nanosecond.
Syntax
of
has the following syntax.
public static OffsetTime of(int hour,
int minute,
int second,
int nanoOfSecond,
ZoneOffset offset)
Example
The following example shows how to use of
.
import java.time.OffsetTime;
import java.time.ZoneOffset;
//from w w w. ja v a 2 s. c o m
public class Main {
public static void main(String[] args) {
OffsetTime m = OffsetTime.of(12,12,123,1233,ZoneOffset.UTC);
System.out.println(m);
}
}