Java Set collection

table of Contents


Set

  • Set interface is a sub-interface Collection, Set interface does not provide new methods;
  • Set of elements unordered containers implemented in the interface, not repeated, containing up to a null;
  • Set a non-thread-safe, but the bottom is achieved using the Map, so you can work to achieve thread-safe Set ConcurrentHashMap by the way;
  • Container class implements the Set interface Java API provided are HashSet, TreeSet such as:

Implementation class

Published 59 original articles · won praise 60 · views 1582

Guess you like

Origin blog.csdn.net/Regino/article/details/104497694