Java AtomicIntegerArray(int length) Constructor

Syntax

AtomicIntegerArray(int length) constructor from AtomicIntegerArray has the following syntax.

public AtomicIntegerArray(int length)

Example

In the following code shows how to use AtomicIntegerArray.AtomicIntegerArray(int length) constructor.


import java.util.concurrent.atomic.AtomicIntegerArray;
/*  w w  w .  j a  va2 s . co  m*/
public class Main {
  public static void main(String[] argv) throws Exception {
    AtomicIntegerArray atomicIntegerArray = new AtomicIntegerArray(10);
    
    System.out.println(atomicIntegerArray);
  }
}

The code above generates the following result.





















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




AtomicBoolean
AtomicInteger
AtomicIntegerArray
AtomicLong
AtomicLongArray