Here you can find the source of newHashMap()
public static <K, V> HashMap<K, V> newHashMap()
//package com.java2s; /*//w w w. ja va2s . com * Hibernate Validator, declare and validate application constraints * * License: Apache License, Version 2.0 * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>. */ import java.util.HashMap; import java.util.Map; public class Main { public static <K, V> HashMap<K, V> newHashMap() { return new HashMap<K, V>(); } public static <K, V> HashMap<K, V> newHashMap(int size) { return new HashMap<K, V>(size); } public static <K, V> HashMap<K, V> newHashMap(Map<K, V> map) { return new HashMap<K, V>(map); } }