Map与List性能比较
1.Collection接口与Map的总体框架图
Collection
├List
│├LinkedList
│├ArrayList
│└Vector
│ └Stack
└Set
Map
├Hashtable
├HashMap
└WeakHashMap
由上图可以看出:List和Set都源自Collection,而Map自成体系;
2.HashMap,ArrayList与HashTable,Vector的区别联系
HashMap,ArrayList是异步执行的这样有助于提高工作效率,但并不是线程安全的.并且HashMap允许键值对的值为null;
HashTable和Vector是同步执行的,但是线程安全,这样的效率不如HashMap和ArrayList
3.List集合性能比较:
ArrayList是首选,在多用于查