What is the output of the following code?
open class Drink(val cost: Int) {
override fun equals(other: Any?): Boolean {
return other is Drink && cost == other.cost
}
}
class Coffee(cost: Int, val name: String) : Drink(cost)
fun main() {
val coffee1 = Coffee(10, "Latte")
val coffee2 = Coffee(10, "Cappuccino")
println(coffee1 == coffee2)
}