When you use == with a primitive -int, double, char, ... you are checking that
the values are identical. But if you use == with an object, you are checking that the 2
objects are stored at the same address. In other words the references pointing to the
same object...
Method equals () is different.
It is the same as ==, if it isn't overriden by the object class.
Many classes override the method equals (). In this case this method will check that
content of the object is the same or not, not addresses.