Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

access each key and value in a hashmap java

// access each key and corresponding value in a hashmap
HashMap<Integer, Integer> map = new HashMap<>();

for(Map.Entry<Integer, Integer> entry : map.entrySet()){
  entry.getKey();
  entry.getValue();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #access #key #hashmap #java
ADD COMMENT
Topic
Name
1+9 =