Skip to content
Sharp

Language Upgrades · interview question

How would you explain a key feature of the java.time API that addresses deficiencies in the older Date and Calendar classes in an interview?

Multiple choiceEasychapter-12-curatedpremiumlanguage-upgradesmigration-strategy
Choose one answer
Answer and explanation

Correct answer

A. Immutability and thread safety.

Why

The java.time API is immutable and thread-safe, addressing the concurrency and mutability issues present in the older Date and Calendar classes.

Test yourself on Language Upgrades

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

Start free test
All Language Upgrades questions →