Loading…
Loading…
Ten exam-style questions on sealed, permits, final, sealed and non-sealed subclasses, omitting permits, nested subclasses, sealed interfaces, package rules and exhaustive switches over sealed types, with explanations.
Practice questions for the article Java Sealed Classes and Interfaces.
For each direct subclass, check two things: is it listed (or in the same file), and does it say final, sealed or non-sealed? Aim for at least 8 out of 10.
Quiz path: step 46. Take the quizzes in this order, after reading each article.
Previous quiz: Enums (OCP 21)
Next quiz: Records (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.