Introduction
The getDayOfWeek()
method is used to retrieve the day of the week of a given date. It is a part of the java.time.LocalDate
class in Java. This method returns an object of the java.time.DayOfWeek
enum that represents the day of the week for the given date.