Capgemini Engineering Interview Question

What is the reason for overriding equals() and hashCode() methods?