LocalTime atDate() method in Java with Examples
The atDate() method of a LocalTime class is used to combine this LocalTime Object with a LocalDate Object to create a LocalDateTime. All possible combinations of date and time are valid.
public LocalDateTime atDate(LocalDate date)
Parameters: This method accepts a single parameter date which is the date to combine with LocalTime Object, not null.
Return value: This method returns the LocalDateTime object after combining LocalTime and LocalDate, not null.
Below programs illustrate the atDate() method:
Date and Time:2018-12-05T09:32:42
Date and Time:2017-12-05T18:12:49
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.