创建线程安全的Map

static Map<Integer, User> users = Collections.synchronizedMap(new HashMap<Integer, User>());

发布了29 篇原创文章 · 获赞 5 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/chyercn/article/details/100151592