title: How does equals() method work in Java
body: <p>The <code>equals</code> method compares whether two object values are equal or not. My question is how it compares the two objects? How can it tell the two objects are equal or not? I want to know based on what it compares the two objects. I am not including the <code>hashCode</code> method.</p>