hashmap初始化写法

1、初始化1.5倍的写法

// 一位操作

        Map<String, String> firstMap = new HashMap<String, String>(firstOrders.length + firstOrders.length>>1L);

        for (int j = 0; j < firstOrders.length; j++) {

            firstMap.put(firstOrders[j], "1");

        }

猜你喜欢

转载自yangbinfx.iteye.com/blog/2413018