Choose the correct option based on this code segment:
LocalDate babyDOB = LocalDate.of(2015, Month.FEBRUARY, 20);
LocalDate now = LocalDate.of(2016, Month.APRIL, 10);
System.out.println(Period.between(now, babyDOB).getYears()); // PERIOD_CALC
D.
here are the arguments to the between()
method in the Period class:
Period between(LocalDate startDateInclusive, LocalDate endDateExclusive)
the first argument is the start and the second argument is the end, and hence the call Period.between(now,babyDOB)
results in -1 (not +1).