Kotlin - Variables and Type System
What will be the output of the following Kotlin code?
val list = mutableListOf(1, 2, 3) list.add(4) println(list)
val list = mutableListOf(1, 2, 3) list.add(4) println(list)
val means the reference to the list cannot change, but the list itself can be modified.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions