© 2023 Hashnode
#sealed-class
In the last article, we covered data classes in Kotlin. We saw how they simplify class creation and make it faster with less coding. Now, let's explore Sealed Classes. Sealed Classes in Kotlin are a s…
Kotlin sealed classes are a powerful tool for creating restricted class hierarchies in which an object can only have one of the specified types. They are similar to Enums, but with additional features…
The article aims to explain the below list of things: Enum Classes Why do we use enum classes in the first place ? How to use enum classes ? Usage of enum classes using when block …