Domanda di colloquio di Luxoft

What's a contract between equals() and hashcode()?