I. Basic CONCEPTS
1. What is a container?
2. Why do I need a container?
3. Classification of containers?
Two. Key knowledge
List interface
Collections Class
(1) Why do I need it?
Collection class implementation class, and there is no sort, inversion, lookup method, these methods can be given by collections, and the method of the class is public static, can be called directly with the class name
(2) What are the methods?
Comparable interface
(1) Why is there a comparable interface?
The comparison method of the container, such as a custom class, is not, so you can implement the comparable interface to achieve the comparison of the individual collections (note that the comparison criteria for the basic type and the data of the string class are available)
(2) How to instance comparable interface?
The ToString () method and the CompareTo () method need to be overridden, and the CompareTo () method is called automatically at sort time
Set interface
What classes need to override the Equals () method and the Hashcode () method?
Java Container (collection)