Java Sealed Interfaces

Java 15

Sealed Classes and Interfaces

In Java, by default, there is no restriction on a class which public interfaces it can impliment. Since Java 15, now a class or interface can be declared sealed class or sealed interface using the modifier sealed. It is a preview feature in Java 15. A sealed class or interface restricts which other classes or …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.