Iterating a HashMap
Here is a quick example that shows how to iterate over a HashMap. You have the option of using the map key set or the map entry set. [code] import java.util.HashMap; import java.util.Map; import java.util.Set; public class HashDemo { public static void main(String[] args) { Map<String, String> theMap = new HashMap<String, String>(); theMap.put("alfa", "john"); theMap.put("beta", "mary"); theMap.put("code", "susan"); // [...]