[HD Pg 348, Sec. 12.3.4 - comparing-date-time-objects]

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

Moderator: admin

Post Reply
OCAJO1
Posts: 221
Joined: Mon Nov 26, 2018 2:43 pm
Contact:

[HD Pg 348, Sec. 12.3.4 - comparing-date-time-objects]

Post by OCAJO1 »

IsZero only returns true if all the three components of the Period are zero.
I think this statement should read different, since I tested it with just P0Y and then just with P0w as well as P0y0m0w0d and all three cases resulted in true.

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

Re: [HD Pg 348, Sec. 12.3.4 - comparing-date-time-objects]

Post by admin »

1. What do you think will be the values of other components in the string p0y?
2. It is talking about the components of a Period , not about the string used to create a Period. Components of a Period and the string used to create it are two different things.
3.Components of a Period are years, months and days. How you create a Period is immaterial.
If you like our products and services, please help us by posting your review here.

OCAJO1
Posts: 221
Joined: Mon Nov 26, 2018 2:43 pm
Contact:

Re: [HD Pg 348, Sec. 12.3.4 - comparing-date-time-objects]

Post by OCAJO1 »

Oh I see. So when the string to create the Period is missing the year or days, then that component is just set to zero automatically.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 25 guests