The equals() method is a special method contained in the Object class that compares properties between two objects. The properties that method tests are determined bye the type of object being tested. This is in contrast to the == operator, which tests whether two reference variables are the same.
The equals() method is typically overriden in a subclass. When this method is not overriden, it is identical to the == operator (it compares two reference variables).