Question: what is the difference between equals() and ==?
Answer: The == operator tests whether two variables have the same references (aka pointer to a memory address). Whereas the equals() method tests whether two variables refer to objects that have the same state (values). You will have to override the equals function (along with others) to use this with custom classes.