Java API Tutorial - Java AtomicIntegerArray.get(int i)








Syntax

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

public final int get(int i)

Example

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

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.get(3));
  }
}

The code above generates the following result.