The atStartOfDay() method of LocalDate class in Java is combines this date with the time of midnight to create a LocalDateTime at the start of this date.
public ZonedDateTime atStartOfDay(ZoneId zone)
Parameter: This method accepts a parameter zone which is the zone ID to be used and not necessary null. The parameter is not mandatory.
Return Value: It returns the the local date-time of midnight at the start of this date, not null.
Below programs illustrate the atStartOfDay() method of LocalDate in Java:
Program 2: Program with parameters.
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.