Sealed classes in Kotlin are another new concept we didn’t have in Java, and open another new world of possibilities. A sealed class allows you to represent constrained hierarchies in which an object can only be of one of the given types. That is, we have a class with a specific number of subclasses. What we get in the end is a concept very similar to an enum. The difference is that in the enum we