mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
10 lines
267 B
Java
10 lines
267 B
Java
// "Replace with 'merge' method call" "true"
|
|
import java.util.Map;
|
|
|
|
public class Main {
|
|
public void testMerge(Map<String, Integer> map, String key, int add) {
|
|
Integer val = map.get(key);
|
|
map.merge(key, add, Integer::sum)
|
|
System.out.println(val);
|
|
}
|
|
} |