LocalDateTime toLocalTime() method in Java with Examples
The toLocalTime() method of LocalDateTime class is used to get the LocalTime representation of this LocalDateTime. This method is derived from the Object Class and behaves in the similar way.
public LocalTime toLocalTime()
Parameter: This method takes no parameters.
Returns: This method returns a LocalTime value which is the LocalTime representation of this LocalDateTime.
Below programs illustrate the LocalDateTime.toLocalTime() method: