BlackRock Interview Question

Equals and HashCode in Java. Why do we need them?