The following is a java4android video tutorial from marschen.
Java class set framework.
JDK designers are pleased with this.
A group of classes and interfaces that are frequently used.
1. What is a class set framework?
2. Types of Sets
3. Basic Structure of the class set framework.
What is a class set framework?
1. The framework of a class set is a set of classes and interfaces.
2. It is located in the Java. util package.
3. primary users store and manage objects.
4. Mainly divided into three categories-set, list and ing.
What is a set)
Objects in the set are not sorted in a specific way and there are no repeated objects.
What is list)
Objects in the collection are sorted by index position. Duplicate objects may exist.
What is map)
Each element in the set contains a key object and a value object.
The key cannot be repeated, and the value can be repeated.
The main structure of the class set framework.
Two top-level interfaces
Iterator collection
The following example is used:
import java.util.List;import java.util.ArrayList;public class Test{public static void main(String args[]){ArrayList<String> arrayList = new ArrayList<String>();//ArrayList<Student> arrayList = new ArrayList<Student>();arrayList.add("ab");arrayList.add("2b");arrayList.add("c3");arrayList.add("43");arrayList.remove(1);//String s = arrayList.get(1);//System.out.println(s);//int a = arrayList.size();for(int i = 0; i < arrayList.size();i++){String s = arrayList.get(i);System.out.println(s);}}}