• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Questions on the older Date & Time API?

 
Rancher
Posts: 261
12
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

First time posting here. :-)

I am currently preparing myself to take the OCA exam (read: in some months from now, when I will feel ready). :-)

I understand that since Java 8 there is a new Date & Time API. The release of Java 8 is already quite some time ago. Does the exam today also contain questions about the older Date and Time classes?

Thanks!
 
Bartender
Posts: 5465
212
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Brecht,

welcome to the Ranch and enjoy the stay!

Knowledge of the old Date and Calender API is not required. A good thing, for the new classes are much easier to use.
 
Brecht Geeraerts
Rancher
Posts: 261
12
IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I have come to realise. That's a relief.

Thanks a lot, Piet.
 
Piet Souris
Bartender
Posts: 5465
212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brecht Geeraerts wrote:I understand that since Java 8 there is a new Date & Time API. The release of Java 8 is already quite some time ago. Does the exam today also contain questions about the older Date and Time classes?



Piet Souris wrote:Knowledge of the old Date and Calender API is not required. A good thing, for the new classes are much easier to use.


I'd like to be really clear on what "old" means here.

We've had the java.util.Date and Calendar classes for a long time. They pre-dated Java 8 and really are "old". These classes are not on the exam.

Java 8 introduced classes like LocalDate and LocalTime. While Java 8 has been out for a number of years, these are the current classes. If you were writing code in Java 11 or 12 and wanted a date, you'd use LocalDate. These are not old. They are also on OCA 8 and OCP 8 exams!

Finally, note that the OCA 8 and OCP 8 cover Java 8. Three years from now, they will be three years older and cover the same material. The version of the exam is tied to the version of Java it targets.
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:. . . I'd like to be really clear on what "old" means here. . . .

Date predates Calendar by a couple of versions. Cay Horstmann says you might be forgiven for getting it wrong and correcting it in the second version, but Calendar gets it wrong nearly as much as Date. Or something like that. I don't have my copy of Horstmann to hand to verify the page number or anything.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Jeanne Boyarsky wrote:. . . I'd like to be really clear on what "old" means here. . . .

Date predates Calendar by a couple of versions. Cay Horstmann says you might be forgiven for getting it wrong and correcting it in the second version, but Calendar gets it wrong nearly as much as Date. Or something like that. I don't have my copy of Horstmann to hand to verify the page number or anything.


The point is that neither of them are on the cert exam because both were "superseded" by LocalDate

edit - oh, you are referring to the API designers, not my post
 
Campbell Ritchie
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:. . .  you are referring to the API designers, not my post

Yes, I was.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic