Java tutorial
//package com.java2s; import java.util.Iterator; import java.util.Map; public class Main { public static void printMap(Map map) { Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); System.out.println(entry.getKey() + ": " + entry.getValue()); } } }