Java AtomicIntegerArray .decrementAndGet (int i)

Syntax

AtomicIntegerArray.decrementAndGet(int i) has the following syntax.

public final int decrementAndGet(int i)

Example

In the following code shows how to use AtomicIntegerArray.decrementAndGet(int i) method.


import java.util.concurrent.atomic.AtomicIntegerArray;
// ww w . j  a  v  a 2 s . co m
public class Main {
  public static void main(String[] argv) throws Exception {
    AtomicIntegerArray atomicIntegerArray = new AtomicIntegerArray(new int[]{0,1,2,3});
    
    atomicIntegerArray.decrementAndGet(0);
    
    System.out.println(atomicIntegerArray);
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.util.concurrent.atomic »




AtomicBoolean
AtomicInteger
AtomicIntegerArray
AtomicLong
AtomicLongArray