Java, Kotlin: HashMap Under the hood?

Leo N
5 min readOct 19, 2020

Definition

Java HashMap class is an implementation of Map interface based on hash table. It stores elements in key & value pairs which is denoted as HashMap<Key, Value> or HashMap<K, V>.

It extends AbstractMap class, and implements Map interface and can be accessed by importing java.util package. Declaration of this class is given below.

--

--

Leo N

🎓 “A person who never made a mistake never tried anything new.” — Albert Einstein