Java collections: Framework

I. Overview

1. JDK1.2 introduced Java frame collection, storage of these data structures is dynamically increased or decreased

2. In the java.util package

 

Second, the classification

1. Interface: Collection, List, Map, Set, SortedMap

2. 实现:LinkedList, ArrayList, HashMap

3. algorithms: minimum and maximum values, sorting, filling

 

Third, the advantages and disadvantages

1. Advantages: reduce manual effort to achieve sorting algorithm faster conversion

2. Disadvantages: compatibility type conversion, abnormality check runtime

 

Fourth, the inheritance system is divided into two categories

1. To achieve the Collection interface

 

2. implement the Map interface

 

In 5th, List vs Set the contains () method

1. ArrayList bottom of a for loop a comparator

2. HashSet underlying hash value comparison using more efficient

 

Guess you like

Origin www.cnblogs.com/june0816/p/10247955.html