Java AtomicLongArray.length()

Syntax

AtomicLongArray.length() has the following syntax.

public final int length()

Example

In the following code shows how to use AtomicLongArray.length() method.


import java.util.concurrent.atomic.AtomicLongArray;
// w w w .  j ava  2s .  co m
public class Main {
  public static void main(String[] argv) throws Exception {
    AtomicLongArray atomicLongArray = new AtomicLongArray(10);
    
    System.out.println(atomicLongArray.length());
  }
}

The code above generates the following result.





















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




AtomicBoolean
AtomicInteger
AtomicIntegerArray
AtomicLong
AtomicLongArray