Login Password

Snippets - Detail

Iterate through hashmap

Avatar Image
This loop iterates through a hashmap. very simple.
Language: Java
  1. HashMap<String,Object>b = new HashMap<>();
  2. for (String a:b.keySet()){
  3.             b.get(a)
  4.            // Do something with the item
  5. }
bettercodes.org is released as free software without warranties under GNU Affero GPL v3