title: How many objects are created (string pool+heap)
body: <pre><code>String s = new String("a");
      s.concat("b");
      s.concat("c");
  </code></pre>
  
  <p>As far as I understand, the no. of counts :</p>
  
  <p>In pool - 3 ("a", "b", "c")</p>
  
  <p>In heap - 3 ("a", "ab", "ac"), where "ab" and "ac" are eligible for garbage collection.</p>
  
  <p>Am I right ?</p>
  
  <p>I have this confusion.
  Please help.</p>