What does equals() function of Object class will do?
It will check if the content is equal or not.
it will check if address is equal or not
it checks both address and content, if they are equal or not.
Object class equals() function is empty, it doesn't have any implementation.
Object class's equals function just checks if both the addresses(hashcodes) are equal not.
That is the address(hashcode) of the object which called it and address(hashcode) of the object which is passed as its argument. It won't check for content equivalency, like String class equals function.
Back To Top