title: Returning an empty array
body: <p>I'm trying to think of the best way to return an empty array, rather than <code>null</code>.</p>
  
  <p>Is there any difference between <code>foo()</code> and <code>bar()</code>?</p>
  
  <pre><code>private static File[] foo() {
      return Collections.emptyList().toArray(new File[0]);
  }
  </code></pre>
  
  
  
  <pre><code>private static File[] bar() {
      return new File[0];
  }
  </code></pre>