// 导入 HashMap 类
import java.util.HashMap;
public class Main {
public static void main(String[] args) {
// 创建一个名为 people 的 HashMap 对象
HashMap<String, Integer> people = new HashMap<String, Integer>();
// 添加键值对 (姓名, 年龄)
people.put("Bill", 32);
people.put("Elon", 30);
people.put("Steven", 33);
for (String i : people.keySet()) {
System.out.println("姓名: " + i + " 年龄: " + people.get(i));
}
}
}