About Question enthuware.ocpjp.v17.2.3759 :

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

Moderator: admin

Post Reply
Val Martinez
Posts: 11
Joined: Thu Sep 01, 2022 10:58 am
Contact:

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

Post by Val Martinez »

Hi admin:

Answer marked as correct is

2022-11-01T09:00-05:00[US/Eastern]
2022-11-01T10:00-05:00[US/Eastern]

I have executed the piece of code and got

2022-11-01T10:00-05:00[US/Eastern]
2022-11-01T10:00-05:00[US/Eastern]

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

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

Post by admin »

That is because the DST didn't end on 1st Nov 2022. It ended on 6th Nov 2022. So if you change the LocalDate to LocalDateTime.of(2022, Month.NOVEMBER, 5, 10, 0); your code will print 9 and 10 (instead of 10 and 10).

The answer is correct because the question asks you to assume that DST ends on 1st Nov 2022. If it really did end on 1st Nov, you would have gotten the said output.

The explanation is also correct but it will be enhanced to make this point clear.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

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