SETS

 

Sets in general

 

■ You cannot put duplicate items into Sets.  Thus Sets can have only one null element

 

■ There are no "older" Sets, as with the “older” Vector and Stack for Lists.  The commonly used Sets are HashSet (for uncontrolled and unordered entries) and TreeSet (for automatically ordered and sorted entries)

 

■ Unlike what the List interface does for Lists, the Set interface doesn't add any new methods for Sets. So, unlike the List interface, the Set interface isn't covered on this site.  It doesn't define anything new which you can use.

 

■ Here is how methods for Sets operate on elements: