View Single Post
Old Jun 8th, 2005, 3:51 AM   #10
Berto
Programming Guru
 
Join Date: Aug 2004
Posts: 1,022
Rep Power: 6 Berto is on a distinguished road
Send a message via AIM to Berto Send a message via MSN to Berto
Quote:
Originally Posted by Knight
*smacks himself in the head*
How could I forget that! I always seem to miss the little things :p . Gilward Kukel is correct. When comparing Strings, make sure to use the equals() method or the equalsIgnoreCase() method. If you're using the == to compare (2) strings, if I remember correctly, it will compare their memory addresses, which will not be the same thus returning false.
oh the amount of times i have done that is unbelivable and every time i sit there fror a good half an hour going well

"a" does equal "a" so "a" == "a" is okay (change "a" to variable names or seomthing)
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity."

- Albert Einstein
Berto is offline   Reply With Quote