Page 1 of 1
About Question enthuware.ocpjp.v8.2.1426 :
Posted: Wed Sep 14, 2016 5:58 am
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 ?
Re: About Question enthuware.ocpjp.v8.2.1426 :
Posted: Wed Sep 14, 2016 11:01 am
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.