Expectation: console prints: "Making 2 cups of Light coffee"
Reality: Error:(2, 30) Kotlin: The integer literal does not conform to the expected type Array
//Class
class CoffeeMaker(
var strength: Array<String> = arrayOf("Light", "Medium", "Dark"),
var cups: Int? = null
) {
fun brewCoffee() {
println("Making $cups cups of $strength coffee")
}
}
// Main.kt
fun main() {
val coffee = CoffeeMaker(0, 2)
coffee.brewCoffee()
}