Select from following answers:- inherits
- extends
- sealed

- not inheritable
- All Above
Sealed class is used to define the inheritance level of a class.
The sealed modifier is used to prevent derivation from a class. An error occurs if a sealed class is specified as the base class of another class.
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.
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator