is there something wrong with this java code?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2337516/is-it-better-to-create-a-new-object-and-return-it-or-create-the-new-object-in-the">Is it better to create a new object and return it or create the new object in the return statement?</a>  </p>
</blockquote>



<p>Hi guys,</p>

<p>Can someone explain if the first method is worse than second one?</p>

<pre><code>public byte[] getBytesForSource() throws IOException {
        Preconditions.checkNotNull(this.fSource, "Raw source does not exist.");
        byte[] baFile = Files.toByteArray(this.fConvertedSource);
        return baFile;
    }
</code></pre>

<p>vs</p>

<pre><code>public byte[] getBytesForSource() throws IOException {
        Preconditions.checkNotNull(this.fSource, "Raw source does not exist.");
        return Files.toByteArray(this.fConvertedSource);
    }
</code></pre>

<p>I understand that the first one instantiates an array of bytes and return it but however, the second one also returns an array of bytes...</p>

<p>So why the second one is better?</p>
