ENUM vs. SEALED Class... THIS Is the Difference

preview_player
Показать описание
Follow for more Android & Kotlin tips 🙌
Рекомендации по теме
Комментарии
Автор

Just to advertise: Instead of sealed class is better to use sealed interface in this case because you're not using the sealed class' constructor

pierre.vieira
Автор

In Swift programming language you combine both capabilities into an `enum`, using the concept of “associated values” for enum cases with different constructor signatures 😊

ugommirikwe
Автор

sealed class vs sealed interface and usecase for both please

studiomacbookpro
Автор

what is the theme of your Android studio??

jonghunpark
Автор

Sealed Classes hierarchy can save state, enum can't

exmi