HashMap最大,初始化容量,扩展因子
Entry[] table; ->Map.Entry<K,V>
int size;
Hashtable //实现继承字典抽象类,现在实现Map的接口
//synchronized方法(size(),get(),set(),equals()等来实现同步)
ConcurrentHashMap ConcurrentHashMap分片段上锁,hashtable实现了同步
ArrayList /容器是对象数组object[]
List list = Collections.synchronizedList(new ArrayList(...))
LinkedList Entry<E>
Entry(E element, Entry<E> next, Entry<E> previous) {
this.element = element;
this.next = next;
this.previous = previous;
}
Collections.synchronizedList(llist);
Collections.synchronizedMap(map);
Vector实现了synchronized方法
Set s=Collections.synchronizedSet(new HashSet());//通过wrap方法实现同步
HashMap<E,Object> map;
ThreadLocal->ThreadLocalMap->Thread
ThreadLocalMap is a customized hash map suitable only for
maintaining thread local values.
Threadlocal
String
private final char value[];
/** The offset is the first index of the storage that is used. */
private final int offset;
/** The count is the number of characters in the String. */
private final int count;
所以string是不可变的