title: What to pass to the Arrays instance method toArray(T[] a) method?
body: <p>If you have an instance of a Collection, say something like:</p>
  
  <pre><code>Collection&lt;String&gt; addresses = new ArrayList&lt;String&gt;();
  </code></pre>
  
  <p>Which were to then be populated with a bunch of values, which is the "best" way, if any, to make use of the toArray() method without requiring a type cast?</p>
  
  <pre><code>String[] addressesArray = addresses.toArray(new String[] {});
  String[] addressesArray = addresses.toArray(new String[0]);
  String[] addressesArray = addresses.toArray(new String[addresses.size()]);
  String[] addressesArray = addresses.toArray(new String[addresses.size() + 5]);
  </code></pre>
  
  <p>Is there any semantic difference between the first two? Is the third most efficient? Is the fourth less efficient than the third?</p>