??????????臨???
??????LinkedList?????????е?????????????£?
private static class Entry<E> {
E element;
Entry<E> next;
Entry<E> previous;
Entry(E element?? Entry<E> next?? Entry<E> previous) {
this.element = element;
this.next = next;
this.previous = previous;
}
}
???????Entry????reference?б??е????????????????LinkedList?????????????????????????????1000??????LinkedList??????1000????????????Entry?????????????????б??е??????????????????????LinkedList???н???????????儷???????????洢??1000??Entity?????????????
????ArrayList??????????????????洢?????????????????????10.?????????????????μ??????????1????????????=(??????*3)/2+1??????????????????????50%??????ζ?????????????????????????ArrayList???????????к?????????????????????ArrayList???????????????????????????????????μ????????齫???ò?????????з??????????????μ?????????????????·??????????????????????????????????ArrayList?????ж???????????????????????????????????????????????trimToSize??????ArrayList????????????????????
???????????
????ArrayList??LinkedList???????????????????и???????????????????????????????£?
????1????ArrayList??LinkedList????????б??β??????????????????????????????ArrayList??????????????????????????????????????????????????????????????з???????LinkedList?????????????????????????????Entry????
????2????ArrayList???м????????????????ζ??????б??????????????????????LinkedList???м?????????????????????????
????3??LinkedList??????Ч????????????
????4??ArrayList??????????????????list?б???β?????????????????LinkedList???仨???????????????????????????????????
???????????????????????????????????????????????????????м???????????????????е??????????ArrayList???????????????????????????????????????м?????????????????????????????е?????????????LinkedList???