Kotlin - Collections Fundamentals
Identify the error in the following Kotlin code snippet:
val arr = arrayOf(1, 2, 3) arr[3] = 4 println(arr.joinToString())
val arr = arrayOf(1, 2, 3) arr[3] = 4 println(arr.joinToString())
arr[3] = 4 causes an IndexOutOfBoundsException at runtime.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions