Map的value是否可以为null?
作者:互联网
public static void main(String[] args) {
Map<String,Boolean> searcher = new HashMap<>();
searcher.put("one",null);
searcher.put("two",null);
searcher.put("three",null);
System.out.println(MapUtils.isEmpty(searcher));
System.out.println(JsonUtils.toJson(searcher));
}
示例
标签:Map,searcher,System,value,put,null,out 来源: https://blog.csdn.net/LyySwx/article/details/111051195