Describe the contract of equals and hashCode. Why is it important that if you implement one, that you implement both?

Technical