First item first - STRING POOL Does not have string literals
String Pool is a set of links pointing to String objects.
When you write String = "hello", it creates a "hello" object on the heap and places a link to this object in the string string pool (assuming the object is no longer on the heap named "Hello")
"" . , , . , , GC
?
, string canonicalisation. HashMap. HashMap ,
.
.ie , JVM.
?
NO STRING POOL DOESNOT GROW IN SIZE -
?
-XX: StringTableSize = N , N -
:
, String Pool ?
: java.lang.OutOfMemoryError:java.lang.OutOfMemoryError: Java heap space java 7 . java.lang.OutOfMemoryError: PermGen space java 6