Skip to content

Instantly share code, notes, and snippets.

@XDo0
Created April 25, 2021 08:27
Show Gist options
  • Save XDo0/9062f4ed3a57e1006cb15c737a1f4b9b to your computer and use it in GitHub Desktop.
Save XDo0/9062f4ed3a57e1006cb15c737a1f4b9b to your computer and use it in GitHub Desktop.
Traversal of Java hashmap value
Iterator< Map.Entry< Integer,String>> it = hashmap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry< Integer,String> entry = it.next();
// entry.getKey()
// entry.getValue()
System.out.print(entry.getValue());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment