Applying Object-Oriented Principles in Java ProgramsSealed classes, records and exhaustive switches
In one line: Sealed types list their permitted subtypes, each final, sealed or non-sealed, so a pattern switch covering them all needs no default.
You’ve read your 2 free 1Z0-831 lessons
Sign up free to read every lesson — your progress is saved.
Spotted a mistake in this part?