Loading…
Loading…
Ten exam-style questions on creating and printing Period and Duration, chained static factories, which types accept which amount, ChronoUnit.between truncation, truncatedTo, Instant conversion and US daylight saving time gaps and overlaps, with explanations.
Practice questions for the article Java Period, Duration, Instant and Daylight Saving Time.
The questions follow Java 21 rules, as on the 1Z0-830 exam. Decide first whether each amount is calendar-based (Period) or clock-based (Duration), and convert zoned times to UTC when in doubt. Aim for at least 8 out of 10 before moving on.
Quiz path: step 27. Take the quizzes in this order, after reading each article.
Previous quiz: LocalDate, LocalTime, LocalDateTime and ZonedDateTime (OCP 21)
Next quiz: Chapter 4 Review: Core APIs (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.