You're creating two different objects in the
String constant pool. The equality
test (==) only returns true when two object references are pointing to the same object. If you want to compare value, then use one of the String's equals() methods:
[ October 08, 2003: Message edited by: Jeff Bosch ]
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4 all those years ago...)