synchronization on an arrayList java
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6910807/synchronization-of-non-final-field">Synchronization of non-final field</a>  </p>
</blockquote>



<p>I have an arrayList and when i use this:</p>

<pre><code>//declare it as a global ArrayList
private ArrayList &lt;Human&gt; myList = new ArrayList &lt;Human&gt;() ;

//inside a method
synchronized (myList){     
    for(  ListIterator&lt;Human&gt; it = myList.listIterator();it.hasNext();){  
       Human = it.next();
</code></pre>

<p>it tells me Synchronization on non-final field. what should i do?</p>
