Solved

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

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

707 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

19 Experts available now in Live!

Get 1:1 Help Now