What does equals(Object obj) do?
It redefines “equality” of objects. By default (defined in java.lang.Object), an object is equal to another object only if it is the same instance. But you can provide custom equality logic when you override it. For example, java.lang.String defines equality by comparing the internal character array. That’s why: Even though you may not need to … Read more