Exam 1z0-816 All QuestionsBrowse all questions from this exam
Question 36

Given:

LocalDate d1 = LocalDate.of(1997,2,7);

DateTimeFormatter dtf =

DateTimeFormatter.ofPattern( /*insert code here*/ );

System.out.println(dtf.format (d1));

Which pattern formats the date as Friday 7th of February 1997?

    Correct Answer: D

    To format the date as 'Friday 7th of February 1997', the correct pattern needs to include day name (eeee), day of the month (d) followed by 'th of', full month name (MMMM), and year (yyyy). Using single quotes (' ') correctly preserves the text literal that should not be interpreted as date-time fields. Therefore, the correct pattern is 'eeee d'th of' MMMM yyyy'.

Discussion
Sa16253748596Option: D

D is true