Fortech SRL interview question

Basic theoretical questions about java such as why do you also overwrite hashCode when overwriting equals