Can I understand the differences between == and object.equal(Object obj) in the following way? :
That’s object.equal(Object obj) returns true if values of two objects are identical. While == returns true if both type and value of two objects are identical.
==returns true if the references are exactly the same.equals(Object)returns true when the method is written to return true. This can be the same object, an equivalent object or what ever the developer felt like writing.The default implementation is written as
so you can see it does the same thing.