Loading…
Loading…
Ten exam-style questions on choosing and creating java.time types, of() overloads, DateTimeException, immutability, end-of-month clamping, which plus methods exist on which type, with and at methods, toString formats and time zone offsets, with explanations.
Practice questions for the article Java Date and Time: LocalDate, LocalTime, LocalDateTime and ZonedDateTime.
The questions follow Java 21 rules, as on the 1Z0-830 exam. For each line, ask first whether the type even has the field being changed, then whether the result is kept. Aim for at least 8 out of 10 before moving on.
Quiz path: step 26. Take the quizzes in this order, after reading each article.
Previous quiz: Math API, BigInteger and BigDecimal (OCP 21)
Next quiz: Period, Duration, Instant and Daylight Saving Time (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.