How to prevent variables being assigned values which you don't want them to hold. How to enforce a type safety. Enums is one way of doing it. Enums are not unique to Kotlin. In this video we have a look at how enums works in Kotlin.
Follow me on Twitter: https://twitter.com/anilvdeshpande
00:00 Introduction to Enums
01:26 Enum name and ordinal
03:28 Enums Values
04:25 Adding functionality to enums
05:53 Switch with enums
Follow me on Twitter: https://twitter.com/anilvdeshpande
00:00 Introduction to Enums
01:26 Enum name and ordinal
03:28 Enums Values
04:25 Adding functionality to enums
05:53 Switch with enums
- Категория
- Язык программирования Kotlin
Комментариев нет.