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
|