Courseiva
Question 247 of 513

1Z0-829 Practice Question: Handling Date, Time, Text, Numeric and Boolean Values

Which TWO statements correctly use the DateTimeFormatter class? (Choose two.)

⚠ Common exam trap

Oracle often tests the confusion between static factory methods and instance methods, and the correct argument order for overloaded methods like `ofPattern()` and `ofLocalizedTime()`, leading candidates to incorrectly mix up parameter positions or call instance methods on static constants.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);

`DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)` is a valid static factory method that returns a formatter using the default locale's full date style. Option C is correct because `DateTimeFormatter.ofPattern("dd/MM/yyyy")` is the standard way to create a custom pattern-based formatter.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE.ofPattern("yyyy-MM-dd");

    Why it's wrong here

    Incorrect: ISO_LOCAL_DATE is already a formatter.

  • DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);

    Why this is correct

    Correct: uses predefined format styles.

  • DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");

    Why this is correct

    Correct: uses pattern string.

  • DateTimeFormatter formatter = DateTimeFormatter.ofPattern(Locale.US, "yyyy-MM-dd");

    Why it's wrong here

    Incorrect: ofPattern takes pattern first, then optional Locale.

  • DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedTime(Locale.US, FormatStyle.MEDIUM);

    Why it's wrong here

    Incorrect: ofLocalizedTime takes FormatStyle first, then Locale.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.