Files
2026-01-16 13:57:13 +00:00

13 lines
291 B
Java

// "Replace with 'putIfAbsent()' call" "true"
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main(String[] args) {
Map<String, String> vals = new HashMap<>();
String v = vals.putIfAbsent("foo", "bar");
System.out.println(v);
}
}