LocalTime ofNanoOfDay(long nanoOfDay)
gets an instance of
LocalTime from a nanos-of-day value.
ofNanoOfDay
has the following syntax.
public static LocalTime ofNanoOfDay(long nanoOfDay)
The following example shows how to use ofNanoOfDay
.
import java.time.LocalTime; public class Main { public static void main(String[] args) { LocalTime l = LocalTime.ofNanoOfDay(123123); System.out.println(l); } }
The code above generates the following result.