About Question enthuware.ocpjp.v8.2.1426 :

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

Moderator: admin

Post Reply
ramy6_1
Posts: 124
Joined: Wed Feb 12, 2014 2:44 am
Contact:

About Question enthuware.ocpjp.v8.2.1426 :

Post by ramy6_1 »

Hello ,
As you mentioned in other question all new Date/Time API classes are immutable and thread-safe , so why you have used "Most of the actual date related classes" in the second option instead of All ?

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

Re: About Question enthuware.ocpjp.v8.2.1426 :

Post by admin »

The statement is about java.time package that contains the new Date/Time API and that statement is taken from https://docs.oracle.com/javase/8/docs/a ... mmary.html
The classes defined here represent the principle date-time concepts, including instants, durations, dates, times, time-zones and periods. They are based on the ISO calendar system, which is the de facto world calendar following the proleptic Gregorian rules. All the classes are immutable and thread-safe.
It is talking about the main classes that represent some time or duration. They are all thread safe.

But this package also contains classes DateTimeException, which is not thread safe.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 261 guests