As per JavaDocs, “LocalTime is an immutable date-time object that represents a time, often viewed as hour-minute-second. Time is represented to nanosecond precision. For example, the value “13:45.30.123456789” can be stored in a LocalTime”.

In other words, the LocalTime represents time without a date. An instance of LocalTime can be created from the system clock or by using the now(), parse() and of() methods.

Let’s look at some of the utilities provided by this class.

Get hands-on with 1200+ tech skills courses.