Home » JAVA Programming » Collections » Question
  1. While finding the correct location for saving key value pair, how many times the key is hashed?
    1. 0
    2. 1
    3. 2
    4. 3
    5. unlimited till bucket is found
Correct Option: C

The key is hashed twice; first by hashCode() of Object class and then by internal hashing method of HashMap class.



Your comments will be displayed only after manual approval.