|
| Total Answers and Comments: 3 |
Last Update: August 20, 2009 Asked by: adesh.khare |
|
| | |
|
Submitted by: Sarje Default Capacity of any Collection say HashSet is 16. It means when you create a HashSet using its default constructor then first HashSet will be created to hold 16 elements or you can say that memory space is allocated to hold 16 elements.
load factor
By default load factor is 0.75. It means when the 75% of the capacity will be filled and you add new element then capacity will be increased (most probably doubled).
For example 16 default capacity and 0.75 load factor till 12th element addition the capacity will remain 16 but when you add 13th element then first capacity will be increased to 32 and element will be added.
Above answer was rated as good by the following members: nagaraju302, mshusain, chief3rd | Go To Top
|