Java HashMap is a hash table based implementation of Java’s Map interface . A Map, as you might know, is a collection of key-value pairs. It maps keys to values. Following are few key points to note about HashMaps in Java – A HashMap cannot contain duplicate keys.