Statement: The material used in this column is written by the VIP students of the Kay Academy, who has the right to be anonymous and has the final right to interpret the article; The Edith Academy is designed to promote students to learn from each other on the basis of public notes.
Vector:
1. Slow speed in multi-threaded situations
2. Thread-Safe classes
2 is the oldest collection class.
LinkedList:
This class is like a double-stranded set.
AddFirst is added to the front
AddLast is added to the back
Removelast is to be removed from the back
Removefirst is to remove from the front
Stack Stacks collection:
This collection inherits from the vector is also thread-safe
Push Stack is an added
Pop out of the stack
Peek feedback current object to be out of stack
1. First take out the current object to be out of the stack
2. Press the subscript to output the object to be out of the stack
3. Return the object taken out
Generic type:
What is a generic type? The purpose of generics is to describe the types stored in the collection
A class has requested generics, and if you don't use it, it's an object type.
This class has applications for generics you can write generics, no need to write
It's like this, which gives you the ability to save a string type.
You don't have to be the object type, if you define the string type that is the string type
A class can request a number of generics, such as:
Customize the generic type in the parameter type
-java-generics