Sonar interview question

how hashmap works in java?