Skip to content
Sharp

Modern Java · interview question

Which characteristic best describes a Java record?

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

Correct answer

A. Immutable data structure

Why

Java records are immutable data structures that provide a concise way to model data. They automatically generate constructors, accessors, and methods like equals() and hashCode().

Test yourself on Modern Java

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

Start free test
All Modern Java questions →