set

operator fun set(index: Int, newValue: T)(source)

Atomically sets the value of the element at the given index to the new value.

Provides sequential consistent ordering guarantees.

Since Kotlin

1.9

Throws

if the index is out of bounds of this array.