title: In Java, how is an Array of objects garbage collected?
body: <p>When an array of objects is not referenced anymore, does the objects in that array are garbage collected too? (assuming no variables are referencing the elements)</p>
  
  <p>In this page, <a href="http://java.sys-con.com/node/37613" rel="noreferrer">http://java.sys-con.com/node/37613</a>
  it says - 
  "The biggest danger is placing an object into a collection and forgetting to remove it. The memory used by that object will never be reclaimed."</p>
  
  <p>If you make sure to nullify the references, why will that memory be unclaimed?</p>
  
  <p>Thanks</p>