Hi, wondering if anyone could clear up this up ..
In Mala Gupta's book (page 177) she says that
String s = new String("text"); creates a String object
but that object is
not placed in the String constant pool.
However, in Sierra & Bates (page 265) the authors state that the above will create a new String
object in normal (non pool) memory, and will
also place the literal "Morning" in the pool - they say
that "two objects are created".
Which author is correct ?
Also, does anyone know how to call the overridden .toString() method (the version in Object)
on a String ?
As always, any help would be greatly appreciated.
John