title: String Constant Pool memory sector and garbage collection
body: <p>I read this question on the site <a href="https://stackoverflow.com/q/1262328/1376167">How is the java memory pool divided?</a> and i was wondering to which of these sectors does the "String Constant Pool" belongs?</p>
  
  <p>And also does the <code>String</code> literals in the pool ever get GCed? </p>
  
  <p>The <code>intern()</code> method returns the base link of the <code>String</code> literal from the pool. </p>
  
  <p>If the pool does gets GCed then wouldn't it be counter-productive to the idea of the string pool? New <code>String</code> literals would again be created nullifying the GC. </p>
  
  <p>(It is assuming that only a specific set of literals exist in the pool, they never go obsolete and sooner or later they will be needed again)</p>