Solved

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

Posted on 2006-11-24
3
203 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 125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java Message handling in Service Layer 3 57
Unexpected HttpURLConnection connection behavior 2 85
how do i compare an object based on two fields 6 49
javap not working 8 36
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now