Goldman Sachs interview question

What is hashCode and equals methods, explain with example and override the same.