Posted in 面试题 onOctober 12, 2015
Vector and Hashtable are two collection classes that are inherently thread safe or synchronized; whereas, the classes ArrayList and HashMap are unsynchronized and must be `wrapped` via Collections.SynchronizedList or Collections.synchronizedMap if synchronization is desired.
Vector和Hashtable是线程安全的,ArrayList和HashMap不是线程安全的而且必须要通过Collections.SynchronizedList或者Collections.synchronizedMap来包装一下才能实现同步。
Vector和Hashtable是线程安全的,ArrayList和HashMap不是线程安全的而且必须要通过Collections.SynchronizedList或者Collections.synchronizedMap来包装一下才能实现同步。
Vector, ArrayList, HashTable, HashMap哪些是线程安全的,哪些不是
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@