What is the difference between Enum and Sealed Classes in Kotlin

后端 未结 0 843
面向向阳花
面向向阳花 2020-12-14 00:17

Let’s look at the difference between them using one simple example. The class Rainbow , which contains different set of colors. It will be represented both in Enum and Seale

相关标签:
回答
  • 消灭零回复
提交回复
热议问题