Learn Map Interface in Java with Programming Example

In this chapter you will learn

  • What is Map Interface in Java?
  • Programming Example

What is Map Interface in Java?

Map Interface provides way to store value mapped by unique key. Later this key is used for retrieving data from collection. A map cannot contain duplicate value and each key map at most one value.

Programming Example


In this programming Example we created a HashMap object and declare it with string type. We added values along with key pair in HashMap object and printed the table.


In this chapter you learned Map Interface in Java. In the next chapter you will learn about HashTable class in Java.

Leave a Reply

Your email address will not be published. Required fields are marked *