Given this code fragment:
What is the result?
LocalDateTime is immutable, and both plusDays and plusMonths return new instances rather than modifying the original value. Because neither return value is assigned, the value remains July 31, 2014 at 01:01. ISO_DATE_TIME formats it as 2014-07-31T01:01:00.
LocalDateTime
plusDays
plusMonths
ISO_DATE_TIME
2014-07-31T01:01:00
Community Discussion