// "Replace with 'Map.containsKey()'" "true-preview" import java.util.Map; class Test { void test(Map map, String key) { if(map.keySet().contains(key)) { System.out.println("contains"); } } }