public static void main(String[] args) { Map<String ,Object> map = new HashMap<>(); map.put("","wang"); map.put("f",null); map.put(null,"haha"); // map.put(null,null); System.out.println(map); }
结果为:{=wang, null=haha, f=null}
本文来自博客园,作者:狂躁的键盘,转载请注明原文链接:https://www.cnblogs.com/wangweiip/p/16529724.html