Morgan Stanley Interview Question

How HashMap works in Java?