title: Java : String a = Integer.toString(1); creates how many objects?
body: <p>I have seen statements that says :</p>
  
  <pre><code>String a = new String("1");
  </code></pre>
  
  <p>creates 2 objects, both on heap, one is referenced by a, one is ref-ed from String literal pool</p>
  
  <p><strong>but, how about:</strong></p>
  
  <pre><code>String a = Integer.toString(1);
  </code></pre>
  
  <p>will it create 2 objects or 1? 
  I think it creates 2, am I correct?</p>