I have following queries regarding java string pool:
Is it a part of java heap of is it a part of native heap of JVM?.As per my understanding its the first one.
Do we have any limit on the size of this string pool?Or is it user configurable ?
In the following two statement
String str = "Stack"; String str2 = str.concat("overflow");
As per my understanding first string literal will be part of the string pool,but after that i did concat on the same string pool object,and it will create new string object,so will this object be allocated in the string pool or it will be in the java heap outside string pool?
4 . I am assuming that the string pool size is fixed,then what happens if this string pool get fully occupied?Do gc will clean up string pool?or JVM can expand the string pool size?