📄 ex_hashmap.java
字号:
package ch7;
import java.util.*;
public class Ex_HashMap {
public static void main(String[] args) {
HashMap map = new HashMap();
map.put("A", "SCJP");
map.put(new Integer(100), new Integer(100));
map.put(new Object(), "SCBCD");
map.put(null, null);
System.out.println(map.toString());
System.out.println("key=A : " + map.get("A"));
System.out.println("key=B : " + map.get("B"));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -