Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HashMap will grow and shrink dynamically

User_19BPUJan 11 2013 — edited Jan 11 2013
Hi,

By default Hashmap takes 16 as an initial capacity. If it is more than 16 it will grow dynamically based on the constant factor.
If it is less than 16 elements set whether it will shrink dynamically as well? Please clarify.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2013
Added on Jan 11 2013
3 comments
1,524 views