Created
October 4, 2013 04:29
-
-
Save sulmansarwar/6820936 to your computer and use it in GitHub Desktop.
Iterate over the contents of a Map..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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