Here you can find the source of printMap(Map map)
public static void printMap(Map map)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.Map; public class Main { public static void printMap(Map map) { Iterator itr = map.keySet().iterator(); System.out.println("-----Printing Map-----"); while (itr.hasNext()) { Object obj = itr.next(); System.out.println(obj + " : " + map.get(obj)); }//from ww w .j ava 2s . c o m System.out.println("-----End Of Map-----"); } }