get

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.3)
operator fun get(index: Int): T
For Common, JVM, JS

Returns the array element at the specified index. This method can be called using the index operator.

value = arr[index]

If the index is out of bounds of this array, throws an IndexOutOfBoundsException except in Kotlin/JS where the behavior is unspecified.

For Native

Returns the array element at the specified index. This method can be called using the index operator.

value = arr[index]

If the index is out of bounds of this array, throws an IndexOutOfBoundsException.

© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/get.html