The == gives true, if the variable reference points to the similar types of object in memory. That is a "shallow comparison".
The equals () - gives the results of running the equals() method of a user supplied class, which differentiate the attribute values. The equals() method gives "deep comparison" by comparing if two objects are logically same as opposed to the shallow comparison given by the operator ==.
If equals () function does not exist in a user supplied class then the inherited Object class's equals () method is run which evaluates if the references point to the similar object in memory. The object.equals() performs just same as the "==" operator.
Overriding the Object class may seem easy but there are many ways to get it worse, and consequence may be unpredictable behavior.