Created
April 25, 2021 08:27
-
-
Save XDo0/9062f4ed3a57e1006cb15c737a1f4b9b to your computer and use it in GitHub Desktop.
Traversal of Java hashmap value
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< 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