Mochaccino

Report a typo

Select the correct output of the code below:

open class Drink(val cost: Int, val name: String) {
    override fun toString() = "cost=$cost, name=$name"
}

class Coffee(val coffeeType: String): Drink(13, "Coffee")

println(Coffee("Mochaccino"))
Select one option from the list
___

Create a free account to access the full topic