Java API Tutorial - 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;

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.