Problem with if condition when test null
Hi guy,
I have a very nice problem with the if condition:
I write this statement
......
Strig location;
......
if ((location == "") || (location == "builder") || (location == "MF - CF - TT - 00")) {....
It's obviuse!
I believed that if the location variable was null the statement gone inside, but .... sigh isn't so.
I see that if a condition of null (location == "") is tested together an OR operator and other conditions it's not working.
I try with .equals and null instead "" also.
While, if i test first all the conditions without null condition and then test null condition after with another if statement..... magic! it work!
if ((location == "builder") || (location == "MF - CF - TT - 00")) {....
......
}
elseif ((location == ""){....
It's strange?No?
Thanks for help...
Bye.

