LocalTime ofSecondOfDay(long secondOfDay) example
Description
LocalTime ofSecondOfDay(long secondOfDay)
gets an instance
of LocalTime from a second-of-day value.
Syntax
ofSecondOfDay
has the following syntax.
public static LocalTime ofSecondOfDay(long secondOfDay)
Example
The following example shows how to use ofSecondOfDay
.
import java.time.LocalTime;
//from ww w. j a v a 2 s . c om
public class Main {
public static void main(String[] args) {
LocalTime l = LocalTime.ofSecondOfDay(10000);
System.out.println(l);
}
}
The code above generates the following result.