为什么不建议使用java的Hashtable

为什么不建议使用java的Hashtable

解决方法:

1.Hashtable使用了同步机制,避免了多个线程同时读写Hashtable。但在iterator遍历过程中其他线程对Hashtable的put、 remove、clear操作都会被成功执行。

2.http://www.yayihouse.com/yayishuwu/chapter/1887

猜你喜欢

转载自blog.csdn.net/qq_30908729/article/details/89680194