Broker Consulting interview question

What is the contract between equals() and hashCode() in Java?