提交 dd96371a 编写于 作者: W weixin_47534470

Wed Feb 28 19:45:00 CST 2024 inscode

上级 b742b39c
run = "javac Main.java && java Main"
language = "java"
[debugger]
program = "Main"
Map<String, Integer> map = new HashMap<>();
// 添加键值对到map中
import java.util.HashMap;
import java.util.Map;
for (String key : map.keySet()) {
Integer value = map.get(key);
// 处理key和value
}
\ No newline at end of file
public class Main {
public static void main(String[] args) {
Map<String, Integer> map = new HashMap<>();
// 添加键值对到map中
for (Map.Entry<String, Integer> entry : map.entrySet()) {
String key = entry.getKey();
Integer value = entry.getValue();
// 处理key和value
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册