Leave a Reply 14

Your email address will not be published. Required fields are marked *


MOHAMED ELSAYED

MOHAMED ELSAYED

I think the correct answer is
B. An exception is thrown at runtime.

Etttat

Etttat

Correct Answer: B

Exception in thread “main” java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: HourOfDay

Kaka Mama

Kaka Mama

Run the code and the answer is B. An exception is thrown at runtime. But what’s the fix or what’s the problem? Is it because an unspecified date object is stored in a string.

Marcos

Marcos

So, the real problem is not related with the object stored in the attribute String, but with LocalDate class it have no support to HourOfDay like exception printed. To correct use LocalDateTime or modify formatter to ISO_DATE.

[]’s

Phan

Phan

Agree with Marcos.

bella

bella

Yes agree with Marcos and several other date formatters also work, such as ISO_LOCAL_DATE. However TestKing says the correct answer is: 2015-05-04T00:00: 00.000. TestKing is wrong again.

Tomas

Tomas

Answer: B

output:
Exception in thread “main” java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: HourOfDay

Vendetta

Vendetta

Did exam MAY 17, 2017…This question was seen

Answer: B

Jessy

Jessy

Answer:B.An exception is thrown at runtime.

Vendetta

Vendetta

Am now OCA Certified as of today. Oh and this question was one the exam

Laika

Laika

what about the other questions? where they on the exam

jeronimo

jeronimo

La correcta es la B