Cognizant Interview Question

How to override hashcode and equals method