Java examples for java.util:Map Operation
print Map to console
//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()); }/* w w w .j av a 2s . c om*/ } }