Sealed Classes and Sealed Interfaces
Sealed classes and sealed interfaces in Java restrict which other classes or interfaces may extend or implement them.
sealedclass
Sealed classes and sealed interfaces in Java restrict which other classes or interfaces may extend or implement them.