LinkedHashSet internally uses LinkedHashMap and TreeSet internally uses TreeMap. Both HashMap and LinkedHashMap allows one null key and so are these two Set implementation. On the other hand since TreeMap doesn't allow null keys, TreeSet doesn't allow null elements ...
There are 4 commonly used implementations of Map in Java SE - HashMap, TreeMap, Hashtable and LinkedHashMap. If we use one sentence to describe each implementation, it would be the following: HashMap is implemented as a hash table, and there is no ordering on keys or values. TreeMap i...