If I use a HashSet
with a initial capacity of 10 and a load factor of 0.5
then every 5 elements added the HashSet
will be increased or first the HashSet
is increased of 10 elements and after at 15 at 20 atc. the capacity will be increased?
views:
26answers:
1
+2
A:
It's the second case. The loadFactor of both HashSet and hashMap is a relative factor.
Riduidel
2010-08-25 09:56:19