Observe that most of the methods of LocalDate (as well as LocalTime and LocalDateTime) return an object of the same class. This allows you to chain the calls as done in this question. However, these methods return a new object. They don't modify the object on which the method is called.
You might want to go through "Creating a date/time object using an existing date/time object" paragraph of Section 12.3.2 Creating date/time objects from OCAJP Fundamentals book by Hanumant Deshmukh..
If you like our products and services, please help us by posting your review here.