• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Questions on the older Date & Time API?

 
Master Rancher
Posts: 181
7
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • 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!
 
Saloon Keeper
Posts: 3462
149
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
Master Rancher
Posts: 181
7
IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I have come to realise. That's a relief.

Thanks a lot, Piet.
 
Piet Souris
Saloon Keeper
Posts: 3462
149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome!
 
author & internet detective
Posts: 39435
768
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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: 65448
248
  • Mark post as helpful
  • send pies
  • 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: 39435
768
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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: 65448
248
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

Yes, I was.
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!