Hi Jacquie,
This discussion has happened many times here that, Whether
String literal pool contains object or reference???
String s = "hello";
According to me, one object get created ("Hello") and that is on String literal pool.
String s1 = new String("Hi");
Now, 2 objects get created, one is on heap that has internally reference of another object "Hi" and this is on String literal pool.
What you say??
This is really a confusing topic...
Thanks a lot.