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
![Sealed classes in Kotlin: enums with super-powers](https://cdn-ak-scissors.b.st-hatena.com/image/square/299e704f46443f2340e864c065859239e9e8af3f/height=288;version=1;width=512/https%3A%2F%2Fantonioleiva.com%2Fwp-content%2Fuploads%2F2017%2F06%2Fsealed-classes-kotlin.jpg)