Skip to content

Instantly share code, notes, and snippets.

@sulmansarwar
Created October 4, 2013 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sulmansarwar/6820936 to your computer and use it in GitHub Desktop.
Save sulmansarwar/6820936 to your computer and use it in GitHub Desktop.
Iterate over the contents of a Map..
Iterator iter = myMap.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry mapEntry = (Map.Entry) iter.next();
System.out.println(mapEntry.getKey() + " : " + mapEntry.getValue());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment