Loading…
Loading…
Ten exam-style questions on records: generated members, accessors, long, compact and overloaded constructors, transforming parameters, immutability, implementing interfaces and the members a record may or may not declare, with explanations.
Practice questions for the article Java Records: Compact Constructors, Accessors and Customization.
When you see a record constructor, first decide whether it's long, compact or overloaded, because each has different rules. Aim for at least 8 out of 10.
Quiz path: step 47. Take the quizzes in this order, after reading each article.
Previous quiz: Sealed Classes and Interfaces (OCP 21)
Next quiz: Record Patterns (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.