ConcurrentHashMap map=buildMap();//init data
Iterator<Object> iterator=map.values().iterator();
while(iterator.hasNext()){
Objetc data=iterator.next();//(1)
System.out.println(data);
}
can other Thread do something then make the (1)data is null?if can ,then how to do??
否ConcurrentHashMap
不允许将null
作为键或值。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.