Pustaka Taratsa
KOTLIN: Sealed Class

KOTLIN: Sealed Class

Penulis: Onno Widodo Purbo

Sumber: https://www.tutorialspoint.com/kotlin/kotlin_sealed_class.htm In this chapter, we will learn about another class type called "Sealed" class. This type of class is used to represent a restricted class hierarchy. Sealed allows the developers to maintain a data type of a predefined type. To make a sealed class, we need to use the keyword "sealed" as a modifier of that class. A sealed class