What is the result?

Given the code fragment:
LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14);
LocalDate nextYear = valentinesDay.plusYears(1); nextYear.plusDays(15); //line n1
System.out.println(nextYear);
What is the result?
A. 2016-02-14
B. A DateTimeException is thrown.
C. 2016-02-29
D. A compilation error occurs at line n1.

Download Printable PDF. VALID exam to help you PASS.

3 thoughts on “What is the result?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.