Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cipher Configuration on Apache HTTPD 4 62
Java Options in Zimbra Server 2 52
difference of if loops 23 49
Is there a simpler dropbox system? 10 18
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

776 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