Reputation: 1436
I want to understand is there any default size given to string constant pool?
Is there any variation in string constant pool in different version on java? What is default size of String constant pool?
Upvotes: 1
Views: 2148
Reputation: 161
According to this article, String Constant pool size varies across different Java versions and releases (but the article itself is over 3 years old, so some changes on the newest Java releases might have been made since then).
The String Pool is implemented as a HashMap. So,
-XX:StringTableSize=<value>
.Upvotes: 3