ERROR - The constructor LocalTime(int, int, int, int) is not visible

Error

The constructor LocalTime(int, int, int, int) is not visible while using LocalTime and Java 8.

Error Type

Compile Time

Sample Code

LocalTime currentTime = new LocalTime(0, 0, 0, 0);

Cause

Constructors for LocalTime are all private.

Resolution

Call the static method to of, ofNanoOfDay or create tp initialize the Localtime instance.  

LocalTime currentTime = LocalTime.of(12, 0);