addAndGet

fun addAndGet(index: Int, delta: Int): Int(source)

Atomically adds the given delta to the element at the given index and returns the new value of the element.

Provides sequential consistent ordering guarantees.

Since Kotlin

1.9

Throws

if the index is out of bounds of this array.