Sorry, I was just rereading that boy wanna meet girl
thread and I suppose my subconscious is playing tricks on me again
Anyway....
String literals are pooled, in the sense that object references with the same literal "value" refer to the same object. Please see the sample code below:
More info can be found in the
JLS in 3.10.5 String Literals. See also the description of the intern() method in the JDK 1.4
docs.
[ September 06, 2002: Message edited by: Anthony Villanueva ]