Skip to content
Sharp

Modern Java · interview question

How would you explain a key characteristic of a Java record in an interview?

Multiple choiceEasychapter-7-curatedpremiummodern-javarecords
Choose one answer
Answer and explanation

Correct answer

C. Immutability

Why

A key characteristic of a Java record is immutability. Once a record is created, its state cannot be changed, making it an ideal choice for representing simple, immutable data carriers.

Test yourself on Modern Java

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

Start free test
All Modern Java questions →