I'm currently reading the "OCP Oracle Certified Professional Java SE 8 Programmer II Study Guide" and just thought I'd seek further clarification on one of the review questions in Chapter 5.
In question 11 it creates a period object using:
Period p = Period.ofDays(1).ofYears(2);
This Period object represents a Period of 2 years which is identified in the answer. The answer mentions that Period does not allow chaining. Is it the case that some of the methods in the Period class can be chained such as minusDays(), minusMonths(), minusYears(), etc? If so, I'm thinking that this explanation might be clearer if it mentions that you cannot chain methods when creating a Period (ie: using the of___ methods).
Thanks for your help with this. I'm really enjoying studying for the Java SE 8 OCP exam using this book.