Map map = new HashMap();
map.put("邓超","孙俪");
map.put("张三","王五");
map.put("李四","赵六");
map.put(null,"关七");
System.out.println("map = " + map);
// remove:根据键删除映射
map.remove(null);
System.out.println("map = " + map);
// get:获取
System.out.println( map.get("李四")); //赵六
// size:获取个数
System.out.println( map.size()); //3
// isEmpty:判断是否为空
System.out.println( map.isEmpty()); //F
// clear:清空
map.clear();
System.out.println("map = " + map); //空
// containsKey:查找建是否存在
System.out.println("map = " + map.containsKey("张三")); //空