Friday, 27 May 2011

Introduction to maps in java

A Map(in the API reference documentation)is an object that maps keys to values. A map cannot contain duplicate keys: Each key can map to at most one value.

These are the interfaces available for maps in java:

  • Map implemented by HashMap and TreeMap
  • SortedMap implemented by TreeMap.
  • Map.Entry which describes access methods to the key-value pairs.

No comments:

Post a Comment