Enum constants today aren’t just mere collections of constants – they can have properties, implement interfaces, and much more.🔗
Kotlin enums are called enum classes and they aren’t simply collections of constants, as in other languages, they also have properties, methods, etc. Each enum acts as a separate instance of the enum class, and the declaration begins with the keywords enum class followed by the class name.↗️
Each enum constant is an object. Enum constants are separated by commas.
An enum class can implement an interface
All enum classes implement the Comparable interface by default. Constants in the enum class are defined in the natural order.
Every enum constant also has properties: name and ordinal, for obtaining its name and position (starting from 0) in the enum class declaration
we can use $this. it will print the data of any of the respective objects from SUN TO SAT