Top "Equality" questions

Equality is a relationship between two or more items or variables or objects that exists if (1) the items are the same item, variable, or object or (2) the items are different items, variables or objects but they have the same value.

What's the difference between equal?, eql?, ===, and ==?

I am trying to understand the difference between these four methods. I know by default that == calls the method equal? …

ruby comparison operators equality
How do you test to see if a double is equal to NaN?

I have a double in Java and I want to check if it is NaN. What is the best way …

java double equality nan
How do you compare structs for equality in C?

How do you compare two instances of structs for equality in standard C?

c struct equality
equals vs Arrays.equals in Java

When comparing arrays in Java, are there any differences between the following 2 statements? Object[] array1, array2; array1.equals(array2); Arrays.…

java arrays equality
What's wrong with using == to compare floats in Java?

According to this java.sun page == is the equality comparison operator for floating point numbers in Java. However, when I …

java equality floating-accuracy
jQuery object equality

How do I determine if two jQuery objects are equal? I would like to be able to search an array …

equality jquery
Determine if 2 lists have the same elements, regardless of order?

Sorry for the simple question, but I'm having a hard time finding the answer. When I compare 2 lists, I want …

python list equality python-2.x
Correct way to override Equals() and GetHashCode()

I have never really done this before so i was hoping that someone could show me the correct what of …

c# equality gethashcode
bash string equality

In bash, what's the difference, if any, between the equal and double equal test operators? [[ "a" = "a" ]] && echo …

bash equals equality
Comparing arrays for equality in C++

Can someone please explain to me why the output from the following code is saying that arrays are not equal? …

c++ arrays comparison equality