Java Map Print printMap(Map map)

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

Description

print Map

License

Open Source License

Declaration


public static <K, V> void printMap(Map<K, V> map) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Iterator;

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

public class Main {

    public static <K, V> void printMap(Map<K, V> map) {
        Set<Map.Entry<K, V>> resultsEntry = map.entrySet();
        Iterator<Map.Entry<K, V>> iter = resultsEntry.iterator();
        while (iter.hasNext()) {
            Map.Entry<K, V> result = iter.next();
            System.out.println(result.getKey() + " = " + result.getValue());
        }//ww w  . j av  a  2  s.  co  m
    }
}

Related

  1. printMap(HashMap map)
  2. printMap(Map map)
  3. printMap(Map mp)
  4. printMap(Map theMap)
  5. printMap(Map mp)
  6. printMap(Map map)
  7. printMap(Map map)
  8. printMap(Map map)
  9. printMap(Map map)