About Question enthuware.ocpjp.ii.v11.2.1449 :

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

Moderator: admin

Post Reply
philippe
Posts: 29
Joined: Sun Jul 16, 2017 4:24 pm
Contact:

About Question enthuware.ocpjp.ii.v11.2.1449 :

Post by philippe »

Another problem with this code:

Code: Select all

LocalDate d = LocalDate.now();
DateFormat df = new DateFormat(DateFormat.LONG);
System.out.println(df.format(d));
Is that the format method of DateFormat takes a Date and not a LocalDate.

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

Re: About Question enthuware.ocpjp.ii.v11.2.1449 :

Post by admin »

Right. Added to the explanation.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

philippe
Posts: 29
Joined: Sun Jul 16, 2017 4:24 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.1449 :

Post by philippe »

Could it be added in added in question bank 1z0-816 too?

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

Re: About Question enthuware.ocpjp.ii.v11.2.1449 :

Post by admin »

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

ftejada
Posts: 5
Joined: Mon Jan 28, 2019 2:00 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.1449 :

Post by ftejada »

DateTimeFormat is not a JDK class, perhaps the question was meant to refer to the java.time.format.DateTimeFormatter class instead? Which indeed does not expose any public constructor.

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

Re: About Question enthuware.ocpjp.ii.v11.2.1449 :

Post by admin »

You are right. It should be DateTimeFormatter.
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 14 guests