About Question enthuware.ocpjp.v17.2.3789 :

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

Moderator: admin

Post Reply
rlobato
Posts: 10
Joined: Fri Jun 28, 2024 3:08 am
Contact:

About Question enthuware.ocpjp.v17.2.3789 :

Post by rlobato »

Whatever is the time is currently in NY, the same time happens 3 hours later in LA.
Isn't it the other way around? "Given that New York is 3 hours ahead of Los Angeles"

Cheers

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

Re: About Question enthuware.ocpjp.v17.2.3789 :

Post by admin »

No. It is correct. NY is ahead, which means, LA is later. So, if it is 9AM in NY now, then the clock will sound 9AM in LA three hours from now.

raphaelzintec
Posts: 167
Joined: Sun Apr 21, 2024 10:43 am
Contact:

Re: About Question enthuware.ocpjp.v17.2.3789 :

Post by raphaelzintec »

i really dont understand how Ny is 3 hours ahead LA but for duration.between LA is higher....

it's like black and white, 1+1=2, NY > LA by 3 hours, but LA bigger...

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

Re: About Question enthuware.ocpjp.v17.2.3789 :

Post by admin »

LA is not "bigger". As the explanation says, Duration.between method can be a negative period if the end is before the start. To find the duration.between, you need to get both the first argument and second argument at the same base line. let's say our base line is NY time. So, 6AM in LA is actually 9 AM in NY. Thus, the second argument (9AM) is NOT before the first argument (6AM). Therefore, the difference will be positive 3 Hours.

raphaelzintec
Posts: 167
Joined: Sun Apr 21, 2024 10:43 am
Contact:

Re: About Question enthuware.ocpjp.v17.2.3789 :

Post by raphaelzintec »

thank you for the explanation

now i understand better with "before" term instead of "smaller/bigger"

NY is before LA with 3 hours ahead so LA is behind and NY is first param so positive

very easy now thank you

Post Reply

Who is online

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