New Integer vs valueOf
<p>I was using <a href="http://www.sonarsource.org">Sonar</a> to make my code cleaner, and it pointed out that I'm using <code>new Integer(1)</code> instead of <code>Integer.valueOf(1)</code>. Because it seems that <code>valueOf</code> does not instantiate a new object so is more memory-friendly. How can <code>valueOf</code> not instantiate a new object? How does it work? Is this true for all integers?</p>
