Java Map Print printHash(HashMap hashMap)

Here you can find the source of printHash(HashMap hashMap)

Description

HashMap Operations

License

Apache License

Declaration

public static void printHash(HashMap<String, Integer> hashMap) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.HashMap;

import java.util.Iterator;

import java.util.Map;
import java.util.Set;

public class Main {
    /**//from w ww  .ja  v a2 s .c  om
     * HashMap Operations
     * */
    public static void printHash(HashMap<String, Integer> hashMap) {
        System.out.println("Print 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());
        }
    }
}

Related

  1. printHash(HashMap hashMap)
  2. printHashMap(String lt, HashMap map, String rt, int maxparm)
  3. printHeaders(Map> headers)
  4. printHttpMessage(String statusLine, Map headers)
  5. printItems(HashMap map)