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
blaroucheAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
if ("All".equals(datefrom) == false)
0
 
CEHJCommented:
:-)
0
 
huiyueCommented:
thisl also can be the same.
if (!"All".equals(datefrom))
{}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.