Sealed modifiers in Object Oriented Programming

What are Sealed modifiers in OOPS?What are the advantages if we use sealed modifiers?

Your Answer

When applied to a class, the sealed modifier prevents other classes from inheriting from it. In the following example, class B inherits from class A , but no class can inherit from class B . You can also use the sealed modifier on a method or property that overrides a virtual method or property in a base class.

Oops

Didn't get the answer.
Contact people of Talent-Oops directly by clicking here