Zalando interview question

why do we need to override equals and hashCode