Home » JAVA Programming » Collections » Question
  1. If large number of items are stored in hash bucket, what happens to the internal structure?
    1. Any further addition throws Overflow exception
    2. The LinkedList will be replaced by another hashmap
    3. The bucket will increase its size by a factor of load size defined
    4. The bucket will switch from LinkedList to BalancedTree
    5. None of these
Correct Option: D

BalancedTree will improve performance from O(n) to O(log n) by reducing hash collisions.



Your comments will be displayed only after manual approval.