Java AtomicIntegerArray .getAndDecrement (int i)
Syntax
AtomicIntegerArray.getAndDecrement(int i) has the following syntax.
public final int getAndDecrement(int i)
Example
In the following code shows how to use AtomicIntegerArray.getAndDecrement(int i) method.
import java.util.concurrent.atomic.AtomicIntegerArray;
/*from w w w .j a va 2 s. c o m*/
public class Main {
public static void main(String[] argv) throws Exception {
AtomicIntegerArray atomicIntegerArray = new AtomicIntegerArray(new int[]{0,1,2,3});
atomicIntegerArray.getAndDecrement(0);
System.out.println(atomicIntegerArray);
}
}
The code above generates the following result.