Aptara interview question

why hashmap uses hashcode and equals method