java map 的put、putIfAbsent、compute、computeIfAbsent、computeIfPresent的行为对比
public static void main(String[] args) {
Map<String,String> testMap = new HashMap<>();
System.out.println("测试put方法返回值");
System.out.println("first put return " + testMap.put("1", "a"));
System.out.println("secon.
原创
2020-06-15 16:29:06 ·
640 阅读 ·
0 评论