1
JavaAdvanced#collections
Buckets are an array of Nodes. The key's hashCode is hashed and modded by capacity to pick a bucket. Collisions chain via linked list; when a bucket exceeds 8 entries (Java 8+), it converts to a red-black tree. Resizes when load factor (0.75) is exceeded.
map.put("key", 1);
// int hash = key.hashCode(); bucket = hash & (capacity-1);
// if two keys land in same bucket, they form a linked list (or tree if >8 entries)