Array.get
所在位置是kotlin.Array.get
,其相关用法介绍如下。
用法:
对于Common、JVM、JS
返回指定 index 处的数组元素。可以使用索引运算符调用此方法。
value = arr[index]
如果 index 超出此数组的范围,则抛出 IndexOutOfBoundsException ,但在未指定行为的 Kotlin/JS 中除外。
对于原生
返回指定 index 处的数组元素。可以使用索引运算符调用此方法。
value = arr[index]
如果 index 超出此数组的范围,则抛出 IndexOutOfBoundsException 。
相关用法
- Kotlin Array.set用法及代码示例
- Kotlin AbstractCoroutineContextKey用法及代码示例
- Kotlin AbstractCoroutineContextKey.<init>用法及代码示例
- Kotlin associateBy用法及代码示例
- Kotlin all用法及代码示例
- Kotlin map用法及代码示例
- Kotlin filterNot用法及代码示例
- Kotlin reduceRight用法及代码示例
- Kotlin Random.Default用法及代码示例
- Kotlin Byte.inc用法及代码示例
- Kotlin getValue用法及代码示例
- Kotlin Double.dec用法及代码示例
- Kotlin windowedSequence用法及代码示例
- Kotlin contentToString用法及代码示例
- Kotlin groupByTo用法及代码示例
- Kotlin commonPrefixWith用法及代码示例
- Kotlin MatchResult.Destructured用法及代码示例
- Kotlin Delegates.notNull用法及代码示例
- Kotlin ifBlank用法及代码示例
- Kotlin filterNotTo用法及代码示例
- Kotlin getOrPut用法及代码示例
- Kotlin Triple.<init>用法及代码示例
- Kotlin Duration.toString用法及代码示例
- Kotlin windowed用法及代码示例
- Kotlin indexOf用法及代码示例
注:本文由纯净天空筛选整理自kotlinlang.org大神的英文原创作品 kotlin.Array.get。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。