Last Updated: June 6, 2026
HashMap is the default implementation of Map for most use cases. It provides average constant-time put, get, and remove by storing entries in an array of buckets and routing each key to a bucket using its hash code. This lesson covers the internal structure, the hash function Java actually uses, what happens when buckets get crowded and turn into red-black trees, how resizing works, the rules around null keys and values, and the threading caveat.