mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
12 lines
293 B
Java
12 lines
293 B
Java
// "Replace with 'getOrDefault' method call" "true"
|
|
import java.util.Map;
|
|
|
|
public class Main {
|
|
|
|
public void testGetOrDefault(Map<String, Integer> map, String key) {
|
|
Integer num = 123;
|
|
System.out.println(num);
|
|
num = map.getOrDefault(key, 0);
|
|
System.out.println(num);
|
|
}
|
|
} |