HashSet: Hashtable stores information by using a mechanism called hashing, and elements are not stored in a certain order;
LinkedHashSet: maintains the linked list of the collection according to the insertion order of elements, and allows iteration in the collection according to the insertion order;
TreeSet: Provides an implementation that uses a tree structure to store the Set interface. Objects are stored in ascending order, and the access and traversal time is very fast.
Extended data
Set< string & gtset = new tree set< string & gt (); ?
set . add(" f "); ?
set . add(" a "); ?
set . add(" b "); ?
set . add(" c "); ?
set . add(" d "); ?
set . add(" e "); ?
system . out . println(set);
References:
Baidu Encyclopedia (Computer Science)