[HD-OCP17/21-Fundamentals Pg 0, Sec. 22.2.2 - using-the-plus-minus-with-at-truncatedto-instance-methods]

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
joaoclopes
Posts: 35
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

[HD-OCP17/21-Fundamentals Pg 0, Sec. 22.2.2 - using-the-plus-minus-with-at-truncatedto-instance-methods]

Post by joaoclopes »

Hello,

there is a typo on the The withXXXmethods section:

Code: Select all

Period p1 = Period.ZERO.withDays(10);
p1 = p1.withMonthss(2);
p1 = p1.withYearss(1); //p1 now points to a Period with 1 year, 2 months, and 10 days
The withMonths and withYears method have an extra "s".

Thanks!

admin
Site Admin
Posts: 10345
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 22.2.2 - using-the-plus-minus-with-at-truncatedto-instance-methods]

Post by admin »

Right. Fixed.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 37 guests