Java OCA OCP Practice Question 1833

Question

What format pattern would you pass to a DateTimeFormatter so it creates hour and minute output such as 02:33?

  • A. HH:MM
  • B. HH:mm
  • C. hh:MM
  • D. hh:mm


D.

Note

For dates, a lowercase m means minute while an uppercase M means month.

This eliminates Options A and C.

A lowercase h means hour.

Therefore, Option B is incorrect, and Option D is the answer.




PreviousNext

Related