String Pool exists in both young and old generation?

Viewed 411

From Java 7 interned Strings are no longer stored in permgen area. Rather they are stored in normal heap space which means they must undergo half GC and full GC. Now after half GC those interned String that survive must be transfered from young to old generation.

  • Does that mean both young and old generation have this string poll?

Next lets say a string in interned. They I define an string literal with same content then in that case it has to point to same string innstance in the pool.

  • So JVM has to serach for the String in both young and old generation and return reference to the approriate string instance. Is my thinking correct?
1 Answers
Related