HashMap<String, Integer> map = new HashMap<>();
HashMap<String, Integer> map = new HashMap<>(16, 0.75f);
HashMap<String, Integer> map = new HashMap<>();
map.put("A", 1);
map.put("B", 2);
map.put("C", 3);
Map<String, Integer> map = Collections.singletonMap("key", value);
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:初始化Hashmap有哪些陷阱