Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to iterate hashmap java

Map<Integer, Integer> map = new HashMap<Integer, Integer>();
for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
    System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #iterate #hashmap #java
ADD COMMENT
Topic
Name
5+1 =