Here you can find the source of newHashMap(Map extends K, ? extends V> m)
public static <K, V> HashMap<K, V> newHashMap(Map<? extends K, ? extends V> m)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { public static <K, V> HashMap<K, V> newHashMap() { return new HashMap<K, V>(); }/* w w w. j a v a 2s . c o m*/ public static <K, V> HashMap<K, V> newHashMap(Map<? extends K, ? extends V> m) { return new HashMap<K, V>(m); } }