Skip to content
Sharp

API Evolution · interview question

Which java.time class would you use to represent a point in time in UTC?

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

Correct answer

A. Instant

Why

The Instant class represents a point on the timeline in UTC. It is immutable and thread-safe, suitable for use when you need a timestamp without timezone information.

Test yourself on API Evolution

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

Start free test
All API Evolution questions →