Skip to content
Sharp

Modern Java · interview question

What keyword is used to define a Java Record?

Multiple choiceEasychapter-12-curatedpremiummodern-javajava-records
Choose one answer
Answer and explanation

Correct answer

A. Record

Why

The 'record' keyword is used to define a Java Record, which is a special kind of class introduced to simplify the modeling of immutable data.

Test yourself on Modern Java

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

Start free test
All Modern Java questions →