Skip to content
Sharp

Modern Java · interview question

Which is a characteristic of a Java record?

Multiple choiceEasychapter-7-curatedpremiummodern-javamodern-java-design-choices
Choose one answer
Answer and explanation

Correct answer

C. Immutable data structure

Why

Java records are inherently immutable, meaning once created, their fields cannot be changed, making them suitable for representing simple data carriers.

Test yourself on Modern Java

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

Start free test
All Modern Java questions →