title: Why Integer class caching values in the range -128 to 127?
body: <p>Regarding my previous Question, <a href="https://stackoverflow.com/questions/20877086/confusion-in-method-integer-valueofstring">Why do == comparisons with Integer.valueOf(String) give different results for 127 and 128?</a> , we know that <code>Integer</code> <code>class</code> has a cache which stores values between <code>-128</code> and <code>127</code>.</p>
  
  <p>Just wondering, why <strong>between -128 and 127</strong>? </p>
  
  <p><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#valueOf(int)" rel="noreferrer">Integer.valueOf() documentation</a> stated that it <em>"<strong>caching frequently requested values</strong>"</em> . But does values between <code>-128</code> and <code>127</code> are frequently requested for real? I thought <em>frequently requested values</em> are very subjective. 
  <br>Is there any possible reason behind this?</p>
  
  <p>From the documentation also stated: <em>"<strong>..and may cache other values outside of this range.</strong>"</em> 
  <br>How is this can be achieved?</p>