LocalTime of(int hour, int minute, int second, int nanoOfSecond) example
Description
LocalTime of(int hour, int minute, int second, int nanoOfSecond)
gets
an instance of LocalTime from an hour, minute, second and nanosecond.
Syntax
of
has the following syntax.
public static LocalTime of(int hour, int minute, int second, int nanoOfSecond)
Example
The following example shows how to use of
.
import java.time.LocalTime;
/*from w w w .j a va 2s . c o m*/
public class Main {
public static void main(String[] args) {
LocalTime l = LocalTime.of(12,23,34,123123);
System.out.println(l);
}
}
The code above generates the following result.