Introduction
The withYear()
method of the Java LocalDate
class is used to get a new date with the specified year. It returns a copy of the current LocalDate
instance with the year changed to the specified value. This lab will guide you through using the withYear()
method in a step-by-step manner.