Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

map interation in java

Map<Integer, Integer> map = new HashMap<Integer, Integer>();

// Iterating over keys only
for (Integer key : map.keySet()) {
    System.out.println("Key = " + key);
}

// Iterating over values only
for (Integer value : map.values()) {
    System.out.println("Value = " + value);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #map #interation #java
ADD COMMENT
Topic
Name
6+3 =