Java examples for java.util:HashMap
Create new HashMap by size
//package com.book2s; import java.util.HashMap; public class Main { public static void main(String[] argv) { System.out.println(newHashMap()); }/* ww w. ja va2 s . c o m*/ public static <T, K> HashMap<T, K> newHashMap() { return new HashMap<T, K>(); } public static <T, K> HashMap<T, K> newHashMap(int size) { return new HashMap<T, K>((int) (size / 0.75)); } }