08-Maps

 

 

        // 创建Map其中newHashMapWithExpectedSize更具有实际意义
        Map<Integer, Integer> map1= Maps.newHashMap();
        Map<Integer, Integer> map2 = Maps.newHashMapWithExpectedSize(8);
        Map<Integer, Integer> map3 = new HashMap<>(8);

 

posted @ 2021-05-29 23:19  程序员008  阅读(45)  评论(0)    收藏  举报