Skip to content
Sharp

API Evolution · interview question

Which java.time class would you use to store a future delivery date and time that accounts for different time zones?

Multiple choiceMediumchapter-12-curatedpremiumapi-evolutionmodern-date-and-time
Choose one answer
Answer and explanation

Correct answer

C. ZonedDateTime

Why

ZonedDateTime includes both date and time along with timezone information, making it suitable for storing future dates and times in applications that need to account for different time zones.

Test yourself on API Evolution

A free test with instant, explained results. No account needed.

Start free test
All API Evolution questions →