title: Why is the data array in java.util.ArrayList package-private?
body: <p>In the <code>java.util.ArrayList</code> class, the object array for the list's elements is defined as package-private:</p>
  <pre><code>transient Object[] elementData; // non-private to simplify nested class access
  </code></pre>
  <p>The comment states that the reason why this field is not private is easier access in nested classes. However, nested classes can access private data of the enclosing class just fine. So why is <code>elementData</code> not private? Is there something happening in the background (e.g., at compilation time)?</p>