Kotlin

    [Kotlin] What is the sealed class?

    [Kotlin] What is the sealed class?

    Advent of the sealed class When several child classes inherit from one parent class, the compiler does not know if there are child classes that inherit the parent class. Let's take an example. We're making an app that records a user's running workouts. At this time, we want to make the human state into a class. There are three types of state: Running, Walking, and Idle. This can be done in code ..