The == operator here tests whether "" and email point are in the same memory location. Even if the variable email did in fact contain an empty string, the == doesn't know that's what you mean. The equals() method in the String class is a test for what's in the String, rather than where the thing is located.
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
posted 11 years ago
Comparing Strings was difficult for me as well. I think this is what you are looking for.
[ September 13, 2005: Message edited by: Stephen Boston ]
Steve<br /> <br />No matter where you go, there you are.<br /> <br />"My evil self is at the door, and I have no power to stop it."
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?