• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Possible typo in OCP Java 17 Practice Tests, Question 42

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there, I found a possible typo in the explanation for Question 42.

42. What is a possible output of the following?



A. 2022-05-13T10:00-07:00[America/Los_Angeles]
B. 2022-05-13T00:00:00Z
C. 2022-05-13T17:00:00Z
D. 2022-05-14T10:00-07:00[America/Los_Angeles]
E. 2022-05-14T00:00:00Z
F. 2022-05-14T17:00:00Z

The answer is option F, which is no problem. But the explanation on Page 448 says:

An Instant represents a specific moment in time using GMT. Since there are no time zones included, options A and C are incorrect. This code correctly adds one day to the instant. It includes the date, making option F correct.



I think the options that include time zones are A and D, not A and C.
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic