Beginner
Kotlin
Q10 / 100
What is a sealed class in Kotlin?
Correct! Well done.
Incorrect.
The correct answer is B) A class that restricts its subclasses to be defined in the same file
B
Correct Answer
A class that restricts its subclasses to be defined in the same file
Explanation
Sealed classes restrict the class hierarchy to a known set of subclasses, enabling exhaustive when expressions.
Progress
10/100