I was asked this question somewhere : In
String s=new String("abc");
how to programmatically prove that the String literal "abc" will be added to the String pool?
PS: I know the JLS says - All String literals(Strings enclosed between "") are added to the String pool.
Also, I looked at the Byte code generated, but in Byte code , I can see only Class Constants pool not Strings Constant pool.