How to check String Pool Contents?
问题 Is there any way to check, currently which Strings are there in the String pool. Can I programmatically list all Strings exist in pool? or Any IDE already have this kind of plugins ? 回答1: You are not able to access the string pool from Java code, at least not in the HotSpot implementation of Java VM. String pool in Java is implemented using string interning. According to JLS §3.10.5: a string literal always refers to the same instance of class String . This is because string literals - or,