🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Date and Time in Java: all 10 questions

Quiz: Date and Time in Java · Question 2 of 10

In LocalDate.of(2026, 1, 15), which month is it?

In LocalDate.of(2026, 1, 15), which month is it?

  1. A.February, because months start at 0
  2. B.December
  3. C.January
  4. D.It depends on the computer's locale
Answer & explanation

Correct answer: January

In java.time, months are numbered 1 to 12, unlike the old Calendar class.

Can you get the rest right without peeking?

Take the timed Quiz: Date and Time in Java quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →