Java Map Print printMap(HashMap map)

Here you can find the source of printMap(HashMap map)

Description

print Map

License

Open Source License

Declaration

public static void printMap(HashMap map) 

Method Source Code

//package com.java2s;
/**/*  w  w  w .j  av  a2 s.  c o m*/
 * @(#)StringUtil.java 
 * 
 * create by x_chenbiwu at 2008-3-7
 * 
 * Copyright 2008 fivemen,Inc. All rights reserved.
 * 
 * fivemen proprietary/confidential.Use is subject to license terms
 */

import java.util.HashMap;

public class Main {

    public static void printMap(HashMap map) {
        java.util.Iterator iterator = map.keySet().iterator();
        Object key = null;
        Object obj = null;
        while (iterator.hasNext()) {
            key = iterator.next();
            obj = map.get(key);
            System.out.println("key:" + key + " value:" + obj);

        }
    }
}

Related

  1. printHeaders(Map> headers)
  2. printHttpMessage(String statusLine, Map headers)
  3. printItems(HashMap map)
  4. printKeys(Map m)
  5. printMap(final Map msg)
  6. printMap(Map map)
  7. printMap(Map mp)
  8. printMap(Map theMap)
  9. printMap(Map mp)