???????????
????LinkedList???????List????Deque????????????????????????????????????????????У?Queue????????????????????Stack??????????????LinkedList?????????????????????????????????????????LinkedList????????????Java???????????????????Stack????????????Java???????????????Queue????????????????????????????У????????ArrayDeque?????????LinkedList???????????????????????????????

????LinkedList??????????????????????????????????????????????????????????????????List????????????????Queue??Stack???Deque???????????????????????????????????????Node?????LinkedList???first??last???÷????????????????????????????????????ν????????????????????first??last?????null??
//Node?????
private static class Node<E> {
E item;
Node<E> next;
Node<E> prev;
Node(Node<E> prev?? E element?? Node<E> next) {
this.item = element;
this.next = next;
this.prev = prev;
}
}
????LinkedList????????????????и??±?????????????????????????λ????β?????????????????????Ч??LinkedList???????????synchronized?????????????????????????????????Collections.synchronizedList()??????????а????
????????????
????add()

????add()???????????汾???????add(E e)???÷?????LinkedList???β?????????????last????????β?????β?????????????????????????????????????ü???????????add(int index?? E element)???÷???????????±????????????????????????????????λ???????????????????????????

???????????????????add(E e)????????????
//add(E e)
public boolean add(E e) {
final Node<E> l = last;
final Node<E> newNode = new Node<>(l?? e?? null);
last = newNode;
if (l == null)
first = newNode;//??????????????????????????
else
l.next = newNode;
size++;
return true;
}
????add(int index?? E element)?????????????????????????1.?????index?????????λ???2.???????????????????
//add(int index?? E element)
public void add(int index?? E element) {
checkPositionIndex(index);//index >= 0 && index <= size;
if (index == size)//????λ?????β???????б????????
add(element);
else{
Node<E> succ = node(index);//1.?????index?????????λ??
//2.???????????????????
final Node<E> pred = succ.prev;
final Node<E> newNode = new Node<>(pred?? e?? succ);
succ.prev = newNode;
if (pred == null)//????λ???0
first = newNode;
else
pred.next = newNode;
size++;
}
}
????????????е?node(int index)?????????СС??trick???????????????????????????????????β?????????峯??????????????????index < (size >> 1)???????index??????????????
????remove()
????remove()????????????汾?????????????????????????????remove(Object o)????????????????±??????remove(int index)??