HashMap is an object that store item in the form of  “key-value” pair. Here, In this post, we will see “how to create a HashMap object in Java and how to iterates its data?”

Easiest representation of HashMap in Java...!!! Click To Tweet

Syntax:

Example

 

Output:

 

Easiest representation of HashMap in Java...!!! Click To Tweet

 

If you like this post, please click like button and share it with others on Twitter. Also, check out my other useful blog posts on Java:

Other Useful References: