Java.util.HashMap
lastmod 2026-11-10created 2016-10-123 edits
java.util.HashMap is a Map implementation class in the Java Collections Framework that stores keys and values in a hash table. It uses the keys' hashCode() and equals() to insert and look up entries in constant time on average, allows null keys and null values, and does not guarantee order. It is not synchronized, so use ConcurrentHashMap when multiple threads share it, and use LinkedHashMap when insertion order is needed. HashSet is implemented internally using this class.