A modern-Java self-check tests record ownership, sealed branches and version-labelled Java17 and Java21 features.
Review the contracts
Review record ownership, sealed branches, pattern-switch release rules before answering.
Choose and explain an answer
Check the release label before evaluating syntax. Identify whether the rule concerns a final reference, a mutable object or the permitted subtype tree.
Select an answer for every question, then check the result and read each explanation. Progress remains in this browser; this is a self-check, not a judged program submission or a credential.
Common Mistakes
A record is not automatically deeply immutable. Do not assume an API is available in the oldest release used elsewhere on the site.
