entries property

Report a typo

What is the output of this code?

enum class Rainbow(val color : String) {
    RED("Red"),
    ORANGE("Orange"),
    YELLOW("Yellow"),
    GREEN("Green"),
    BLUE("Blue"),
    INDIGO("Indigo"),
    VIOLET("Violet")
}
fun main() {
    println(Rainbow.valueOf("Red"))
}

Select one option from the list
___

Create a free account to access the full topic