You are here
Home > Posts tagged "Enum Class"

Kotlin: Enum Class

Kotlin: Enum Class In this post we will discuss Enum Class in kotlin. Enumeration is a special type of class, if class is enum type then it is limited to a set of predefined constants. To declare a class as enum use enum keyword before the class Example: enum class Direction { North,South,West,East } fun main(args:Array<String>) { var