ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the purpose of the sealed class in Kotlin?
Correct Answer: C — To create a hierarchy of related classes with restricted inheritance
A sealed class in Kotlin restricts inheritance to a defined set of subclasses, making it useful for representing restricted hierarchies and exhaustive when expressions.