Kotlin enum class in Android performance
They are exactly the same thing, a Kotlin Enum is a Java JVM Enum.
It would appear so, yes.
I created this in Kotlin:
enum class Thingies {
Red,
Green,
Blue
}
And decompiled it with javap -v
, and here is the header:
public final class Thingies extends java.lang.Enum<Thingies>
minor version: 0
major version: 52
flags: ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM
Bottom line: they are identical, so you probably have to treat them the same way.