title: In Java 8, why is the default capacity of ArrayList now zero?
body: <p>As I recall, before Java 8, the default capacity of <code>ArrayList</code> was 10.</p>
  
  <p>Surprisingly, the comment on the default (void) constructor still says: <code>Constructs an empty list with an initial capacity of ten.</code></p>
  
  <p>From <code>ArrayList.java</code>:</p>
  
  <pre><code>/**
   * Shared empty array instance used for default sized empty instances. We
   * distinguish this from EMPTY_ELEMENTDATA to know how much to inflate when
   * first element is added.
   */
  private static final Object[] DEFAULTCAPACITY_EMPTY_ELEMENTDATA = {};
  
  ...
  
  /**
   * Constructs an empty list with an initial capacity of ten.
   */
  public ArrayList() {
      this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA;
  }
  </code></pre>