Here you can find the source of printHash(HashMap, ?> hashMap)
public static void printHash(HashMap<?, ?> hashMap)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static void printHash(HashMap<?, ?> hashMap) { Set<?> s = hashMap.entrySet(); Iterator<?> it = s.iterator(); while (it.hasNext()) { Map.Entry m = (Map.Entry) it.next(); System.out.println(m.getKey() + "\t" + m.getValue()); }// www.j a va 2s . c om } }