What are Sealed modifiers in OOPS?What are the advantages if we use sealed modifiers?
Sealed classes are used to restrict the inheritance feature of object oriented programming. Once a class is defined as a sealed class, the class cannot be inherited. The "sealed" modifier is used to define a class as sealed. Sometimes classes are too precious and not designed to be inherited.