Here you can find the source of getHashMap()
public static <K, V> Map<K, V> getHashMap()
//package com.java2s; import java.util.HashMap; import java.util.Map; public class Main { public static <K, V> Map<K, V> getHashMap() { return new HashMap<K, V>(); }//www .j av a2 s . co m public static <K, V> Map<K, V> getHashMap(int initialCapacity) { return new HashMap<K, V>(initialCapacity); } public static <K, V> Map<K, V> getHashMap(Map<? extends K, ? extends V> map) { return new HashMap<K, V>(map); } public static <K, V> Map<K, V> getHashMap(int initialCapacity, float loadFactor) { return new HashMap<K, V>(initialCapacity, loadFactor); } }