Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-11-24
3
Medium Priority
?
212 Views
Last Modified: 2010-03-31
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
0
Comment
Question by:blarouche
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 18007338
if ("All".equals(datefrom) == false)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18007408
:-)
0
 

Expert Comment

by:huiyue
ID: 18034306
thisl also can be the same.
if (!"All".equals(datefrom))
{}
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question