Java 15 introduces a new language feature – sealed classes and interfaces. The language syntax allows you to restrict the classes or interfaces that can extend or implement other classes or interfaces. The goal is to let you define the possible hierarchies in your business domain in a declarative ma…