title: Create an array of references
body: <p>If I have a class say A, and I declare an array of 10 elements of this class as,</p>
  
  <p><code>A [] arr=new A[10];</code></p>
  
  <p>Then 10 new objects of A are created and stored in the array.</p>
  
  <p>However, i'd like to be able to do something on the lines of <code>A arr[10];</code> , where the array just holds references to null objects.</p>
  
  <p>The reason I need this is because I only need the array to hold instances I fill in later in the code. So the objects the above statement creates are lost anyway and as I understand object creation is expensive.</p>
  
  <p>So, is there any way to just have an array of references that I can point to the objects I desire later? Or is this not possible and I should resort to using an <code>ArrayList</code>?</p>