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:
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.