????20.Map?????????些?????????????
????Map??????????????????
??????1??Set keyset()??????map?邪?????????key?????Set?????????????map?????map??浠�????????蟹??????????????????????????????????????????????map????????????????????????????????????????????????未???濉�??????????Iterator??Remove??Set.remove??removeAll??retainAll??clear??????????????????map????????????????????add??addAll??????
??????2??Collection values()?????????map?邪?????????value?????Collection????????collection??map?????map??浠�????collection?蟹?????????????????????????????????????collection?????map????????????????????????????????????????????????未???濉�??????????Iterator??Remove??Set.remove??removeAll??retainAll??clear??????????????????map????????????????????add??addAll??????
??????3??Set<Map.Entry<K??V>>entrySet()?????????map????????????????????????????????????map?????map??浠�????collection?蟹??????????????????????????????????????????????map?????????????????????????????????????????????entry????setValue??????????????????未???濉�??????????Iterator??Remove??Set.remove??removeAll??retainAll??clear??????????????????map????????????????????add??addAll??????
????21.HashMap??HashTable?泻尾????
??????1??HashMap????key??value?null????HashTable???????
??????2??HashTable??????????HashMap?????????HashMap????????????HashTable????????????
??????3????Java1.4????????LinkedHashMap??HashMap?????????????????????????????????HashMap???LinkedHashMap??????HashTable????????????????????????????
??????4??HashMap????key??Set???斜????????????fail-fast?????HashTable????key??Enumeration???斜????????????fail-fast??
??????5??HashTable????????????????????????????????????Map??????????CocurrentHashMap??
????22.??尉??????HashMap????TreeMap??
??????????Map?胁?????????位????????????HashMap???????????????????????????????key??????斜?????TreeMap????????????????collection???小???????HashMap??????????????map???TreeMap????????key???????
????23.ArrayList??Vector?泻??????
????ArrayList??Vector??????????????
??????1???????????????????????????????????
??????2??????????????????????????????????????????
??????3??ArrayList??Vector?????????????fail-fast???
??????4??ArrayList??Vector????????null????????????????????????????????
??????????ArrayList??Vector??????
??????1??Vector??????????ArrayList??????????????????????????????斜???懈??????????CopyOnWriteArrayList??
??????2??ArrayList??Vector??????????????????????
??????3??ArrayList?????????????????????Collections?????????????????斜??????斜??
????24.Array??ArrayList?泻????????????????Array??
????Array?????????????????????ArrayList??????????
????Array???????小?????ArrayList??小???????
????Array?????ArrayList????????????addAll??removeAll??iterator???????ArrayList??????????????????些???Array?????谩?
??????1??????斜???小???????????????????娲�??????????
??????2??????????????????????????Collections?????????????????????????????小???????????斜??????????煤?????
??????3????????????????椋�???[][]??List<List<>>???????
????25.ArrayList??LinkedList?泻?????
????ArrayList??LinkedList??????????List?????????????????些?????
??????1??ArrayList????Array?????????????????????????????????????????????????????O(1)????LinkedList?娲�???械?????????????????????????????????????????????????????????????????????????????????????????????????????????????????鑷�????O(n)????ArrayList?????
??????2????ArrayList??????LinkedList?胁?????????????????????????????????????屑??????????婕�?????????小?????????????
??????3??LinkedList??ArrayList??????????妫�???LinkedList?械???????娲�???????????谩?
????26.??些??????????????????????
????ArrayList??HashMap??TreeMap??HashTable??????????????????
????27.EnumSet??????
????java.util.EnumSet???????????????????????????????????????械?????????????????????????????????????????????????EnumSet?????????????????null??????????????些??????????????copyOf(Collection c)??of(E first??E…rest)??complementOf(EnumSet s)??
????28.??些????????????????
????Vector??HashTable??Properties??Stack??????????????????????????????????????????谩?Java1.5????API?????些???????????????????????????????????????????????????????????????????
????29.????????????????
????Java1.5????????java.util.concurrent??????????????????????????????????????????????fail-fast????????ConcurrentModificationException????????????CopyOnWriteArrayList??ConcurrentHashMap??CopyOnWriteArraySet??
????30.BlockingQueue??????
????Java.util.concurrent.BlockingQueue????????校?????屑???????????????????????????斜?????????????????????????????????械??????BlockingQueue?????Java?????????????????????????????-???????????????????????????????锌???????????????锌????????????????BlockingQueue????????斜????????Java???????BlockingQueue??????????ArrayBlockingQueue??LinkedBlockingQueue??PriorityBlockingQueue????SynchronousQueue???
????31.???泻?????????谐??????????
???????????????????????娲�?????java.util.Queue????????????????????Java???????小?????????????????FIFO??????????????????????????Deque???????????????????
?????????泻????????????????????泻???????LIFO?????屑?????
????Stack??????????Vector??????Queue?????????
????32.Collections????????
????Java.util.Collections????????????????????????????????????????????????????????????????????????????????????????????些???????????????????????????????????????????????????????
????33.Comparable??Comparator?????????
????????????????Array??Collection????????????????????????????Java??Comparable????Comparable?????compareTo(T OBJ)????????????????????谩??????????写????????????“this”?????????????????小?????????????????????????????0????????????????????????????锟�???????????????????????????纾�??????CEO?????????????薪????????????HR???????????????????????????????????Comparator???????????Comparable.compareTo(Object o)??????????????????谓?????????????????????????????????巍?Comparator????compare(Object o1??Object o2)?????????????????????????????????????????????小?????????????????????????????????0????????????????????????????
????34.Comparable??Comparator????泻?????
????Comparable??Comparator?????????????????????????????Comparable??????????????????????????????????????????????????????
????Comparator????????????????????????????????????????Comparator?????????????????????
????35.??????味??????????????
????????????????????????????????????????????Arrays.sort()????????????????????????????斜????????????Collection.sort()????????????????????????????Comparable??????????????????Comparator???????????sort()??Collections??????????????????????????????????????????????Collections???????浣�?斜????????椤�
????36.??????????????????????????????????尾??????????????????????
???????????????????????????????Collections.unmodifiableCollection(Collection c)??????????????????????????浼�????魏尾??????????UnsupportedOperationException??
????37.??????未?????????????????synchronized??????
??????????????Collections.synchronizedCollection(Collection c)???????????????????synchronized???????????????
????38.?????????????????????些??
????Java??????????????????????????????????Collections???????些???????????????????List??????????????????????????????????????????????????????小???
????39.??写??O????????????????
??????写??O???????????????械????????????????????????Collection??????????????????????????????????????????写??O??????????????纾�????1??ArrayList??get(index i)?????????????????????????list??????????????????????????O(1)??????2???????????????斜??????????????????O(n)???????????????????械???????????????????
????40.??Java??????????????些????????
??????1????????????????????????????纾�?????????小??????????Array????ArrayList??????????????????????????Map????????????TreeMap???????????????????????????Set??
??????2???些??????????????????????????????????????????娲�?????????????????????????????????1?????小??????
??????3????????????????????????????????????????????????
??????4????????????????????????????????????ClassCastException??
??????5?????JDK?????????????Map??key???????????????hashCode()??equals()??
??????6???????????Collections?????????????????????????????????写???????????????????????????????????????????????????