Solved

What is the opposite of equals?

Posted on 2004-10-24
1,865 Views
Last Modified: 2006-11-17
Hi

Java-Newbie asking a simple question :-)

What is the opposite of equals?

Is there a way of checking for not equality?

example:
String a
String b
String c
String d

if (a.equals(b) && c.unequals(d)) {

Thanks
0
Question by:Nanorama
    3 Comments
     
    LVL 92

    Accepted Solution

    by:
    use the not operator !

    if (a.equals(b) && !c.equals(d)) {
    0
     

    Author Comment

    by:Nanorama
    lol

    Thanks!
    0
     
    LVL 92

    Expert Comment

    by:objects
    no worries :)
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Cisco Complete Network Certification Training

    If you’re an IT engineer or technician, it's time you take your career to the next level. This elite training bundle is brimming with all of the information you need to learn to sit for Cisco CNNA, CCNP, and CCENT certification exams.

    Suggested Solutions

    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    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…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    913 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

    17 Experts available now in Live!

    Get 1:1 Help Now