Array.get所在位置是kotlin.Array.get,其相關用法介紹如下。

用法:

operator fun get(index: Int): T
對於Common、JVM、JS

返回指定 index 處的數組元素。可以使用索引運算符調用此方法。

value = arr[index]

如果 index 超出此數組的範圍,則拋出 IndexOutOfBoundsException ,但在未指定行為的 Kotlin/JS 中除外。

對於原生

返回指定 index 處的數組元素。可以使用索引運算符調用此方法。

value = arr[index]

如果 index 超出此數組的範圍,則拋出 IndexOutOfBoundsException