- HashMap:
Hash table based implementation of the Map interface. This implementation provides all of the optional map operations, and permits null values and the null key. (The HashMap class is roughly equivalent to Hashtable , except that it is unsynchronized and permits nulls.) This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remain constant over time.
- Hashtable:Hashtable (Java 2 Platform SE 5.0)
This class implements a hashtable, which maps keys to values. Any non-
null
object can be used as a key or as a value.To successfully store and retrieve objects from a hashtable, the objects used as keys must implement thehashCode
method and theequals
method. As of the Java 2 platform v1.2, this class has been retrofitted to implement Map, so that it becomes a part of Java's collection framework. Unlike the new collection implementations, Hashtable is synchronized