title: Setting objects in an ArrayList to null
body: <p>If I was to have an ArrayList of objects, and I set a few of them to null, are they susceptible to gc? Or will they stay since they are still being referenced by the ArrayList</p>
  
  <p>ex:</p>
  
  <pre><code>for(NPC n : NPCs){
      n.act();
      n.draw(frame);
      if(n == outOfMap){
              n = null;
          }
  
  }
  </code></pre>
  
  <p>If that loop is "always" being iterated over, will the outOfMap objects be collected? or simply stay there will a null value?</p>