Skip to content
Sharp

API Evolution · interview question

Which class should you use to represent an immutable point in time on the timeline in UTC?

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

Correct answer

C. Instant

Why

Instant is designed to represent a specific moment in time, typically in UTC, without any timezone information, making it immutable and thread-safe.

Test yourself on API Evolution

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

Start free test
All API Evolution questions →