Map<String, Integer> map = new HashMap<>();
// 添加键值对到map中
Set<String> keys = map.keySet();
for (String key : keys) {
    // 获取每个key值
    System.out.println(key);
}