title: JAVA initialize AtomicIntegerArray
body: <p>I'm wondering why it doesn't work to initialize an AtomicIntegerArray like this:</p>
  
  <pre><code>AtomicIntegerArray atomarr = new AtomicIntegerArray(100);
  </code></pre>
  
  <p>Eclipse marks that line as an error <em>Syntax error on token ";", , expected</em></p>
  
  <p>According to the JAVA API which states:</p>
  
  <blockquote>
    <p>public AtomicIntegerArray(int length)</p>
    
    <p>Creates a new AtomicIntegerArray of the given length, with all
    elements initially zero.</p>
    
    <p>Parameters:
    length - the length of the array</p>
  </blockquote>
  
  <p>So it should work like that for my understanding.</p>
  
  <p>I did find a work-around though:</p>
  
  <pre><code>AtomicInteger size = new AtomicInteger;
  size.set(100);
  AtomicIntegerArray atomarr = new AtomicIntegerArray(size);
  </code></pre>
  
  <p>Does this mean the Integer for the size of the Array is obliged to be an AtomicInteger aswell?</p>