Integer.valueOf() better than new Integer()
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2974561/new-integer-vs-valueof">New Integer vs valueOf</a>  </p>
</blockquote>



<p>I read at few place that Integer.valueOf is better than new Integer(), since it allows caching of values to be done by the compiler. So when should I be using new Integer() and not Integer.valueOf(). Is there a reason/scenario where I should not be using Interger.valueOf()</p>

<p>Thanks</p>
