HashMap class

 

see Map interface  for descriptions and examples of all of HashMap's methods. 

 

HashMap  implements Map and extends AbstractMap.  It is for everyday Map usage, where the order of the keys isn’t important.

 

■ It allows null values and (just one) null key.

 

HashMap doesn’t provide for sorting by keys – use TreeMap to get sorted keys.  HashMap's physical order of  keys will be unpredictable.

 

■ Methods: HashMap uses all the familiar Map methods and adds nothing. see Map interface  for its method examples