Link to home
Start Free TrialLog in
Avatar of blarouche
blarouche

asked on

how to code two string that are different. ex: if datefrom is not equal to "All"

Hi Experts,


I have to compare two strings and they must be different for an action. I know the equals method but what to do when they are not.

here is the code I have to write :
if(datefrom  not equals .. to ("All") || dateto not equals  .... to ("All"))


Thank you
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
:-)
Avatar of huiyue
huiyue

thisl also can be the same.
if (!"All".equals(datefrom))
{}