Java 优化:使用函数引用简化 Map 初始化
使用函数引用将 empCodeKeyAndLineValueMap.computeIfAbsent(empCode, k -> new ArrayList<>()).add(lineNum); 优化为 empCodeKeyAndLineValueMap.computeIfAbsent(empCode, ArrayList::new).add(lineNum); 。
原文地址: https://www.cveoy.top/t/topic/qfCE 著作权归作者所有。请勿转载和采集!