Top "Equals" questions

Refers to Java equals method, indicating whether some object is "equal to" this one.

C# difference between == and Equals()

I have a condition in a silverlight application that compares 2 strings, for some reason when I use == it returns false …

c# .net equals
Why would you use String.Equals over ==?

I recently was introduced to a large codebase and noticed all string comparisons are done using String.Equals() instead of == …

c# string equals
Overriding the java equals() method - not working?

I ran into an interesting (and very frustrating) issue with the equals() method today which caused what I thought to …

java equals overriding
Compare two List<T> objects for equality, ignoring order

Yet another list-comparing question. List<MyType> list1; List<MyType> list2; I need to check that they …

c# list comparison equals
Best implementation for hashCode method for a collection

How do we decide on the best implementation of hashCode() method for a collection (assuming that equals method has been …

java hash equals hashcode
How to override equals method in Java

I am trying to override equals method in Java. I have a class People which basically has 2 data fields name …

java overriding equals
How do I test if a variable does not equal either of two values?

I want to write an if/else statement that tests if the value of a text input does NOT equal …

javascript if-statement conditional-statements equals boolean-logic
Integer value comparison

I'm a newbie Java coder and I just read a variable of an integer class can be described three different …

java integer int equals autoboxing
compareTo() vs. equals()

When testing for equality of String's in Java I have always used equals() because to me this seems to be …

java string equals compareto
Create the perfect JPA entity

I've been working with JPA (implementation Hibernate) for some time now and each time I need to create entities I …

java hibernate jpa equals