HashMap稍墙·Hashtable墙瘦证
Vector墙瘦证·ArrayList稍墙

解决方案 »

  1.   

    Hashtable and Vector are syncronized for which the performance will be a little lower that HashMap and ArrayList.
    But some time Hashtable and Vector are necessary.
      

  2.   

    HashMap不同步
    Hashtable同步
    Vector同步
    ArrayList不同步
      

  3.   

    问题一:
    实现了外同步的hashmap对象里面的方法都是同步的吗?  Collections.synchronizedMap(map)返回的其实是一个SynchronizedMap类,它实现了
    map的借口,并对接口方法实现同步。也就是说,你使用的同步对象已经不是你原来的hashMap