Here you can find the source of newHashMap(int size)
Parameter | Description |
---|---|
size | a parameter |
public static <K, V> HashMap<K, V> newHashMap(int size)
//package com.java2s; //License from project: Apache License import java.util.HashMap; public class Main { /**//from w ww . ja v a 2 s.co m * new HashMap * @return */ public static <K, V> HashMap<K, V> newHashMap() { return new HashMap<K, V>(); } /** * new HashMap and initialCapacity * @param size * @return */ public static <K, V> HashMap<K, V> newHashMap(int size) { return new HashMap<K, V>(); } }