What is the output of the following code?
public class Main{ public static void main(String[] argv){ LocalDateTime d = LocalDateTime.of(2015, 5, 10, 10, 33, 44); Period p = Period.ofDays(1).ofYears(2); d = d.minus(p); DateTimeFormatter f = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT); System.out.println(f.format(d)); } }
B.
Period does not allow chaining. Only the last Period method called counts.