All the collection-related implementation classes in Java are implementation classes for these six interfaces.
Collection interface: Each element in the collection is an object, which organizes the objects together to form a one-dimensional structure.
The list interface represents the organization of elements in a certain order of relevance (in which the order is predominant), and the data in the list interface is repeatable.
The set interface is the concept of a set in mathematics: its elements are unordered and cannot be duplicated. (corresponds to the list exactly)
The SortedSet arranges the elements according to numbers as "sortable collections".
Each element in the map interface is not an object, but a key-value pair (Key-value) that consists of a key object and a value object.
1 Packagetomtexts;2 3 Public classtomtexts_03 {4 Public Static voidMain (string[] args)5{String s1= ' hello,java! ';6 intI=s1.length ();7System.out.println ("string S1 length =" +i);8 }9 Ten}
All the collection-related implementation classes in Java are implementation classes of these six interfaces