title: Problems with adding string to a list by many threads
body: <p>this is a follow-up post to <a href="https://stackoverflow.com/questions/22528306/do-i-need-a-concurrent-collection-for-adding-elements-to-a-list-by-many-threads#22528509">Do I need a concurrent collection for adding elements to a list by many threads?</a></p>
  
  <p>everybody there has focused on expaning of the list. I understand how that can be a problem, but .. what about adding elements ? is that thread-safe?</p>
  
  <p>example code</p>
  
  <pre><code>static final Collection&lt;String&gt; FILES = new ArrayList&lt;String&gt;(1000000);
  </code></pre>
  
  <p>and I execute in many threads (I add less than 1000000 elements)</p>
  
  <pre><code>FILES.add(string)
  </code></pre>
  
  <p>is that thread safe ? what are possible problems with doing it that way ?</p>