title: String creation in Pool and Heap
body: <p>Have few doubts in String,</p>
  
  <p>I may be wrong with certain statements as i am writing this based on my understanding from various articles on Internet, please bear with me.  </p>
  
  <ol>
  <li><p>When we do 
  <strong>String str1 = new String ("newStr1");</strong>. 
  This creates 2 string objects. One in regular heap and another in string pool. Why 2 objects and their usage? Why not just one on pool? </p></li>
  <li><p>If we create object as <strong>String str2 = new String("newStr2").intern();</strong>.
  This checks if a similar (meaningfully equal) object is there in pool, give a reference to it. If none, it creates one in pool but not in heap? If so then we should use intern most of the times to save memory? Though it would impact performance a bit.
  So basically it's <strong>String str2 = "newStr2";</strong> (interning is implicit for string literals) </p></li>
  <li><p>After Java-6 the string pool moved from perm gen space to heap area? So  basically we have now just one area as heap or does string pool sits as a separate section in heap now? If it's not a separate section then still 2 objects are created?</p></li>
  </ol>