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
It's the second case. The loadFactor of both HashSet and hashMap is a relative factor.