title: Why adding null in HashSet does not throw Exception,but adding null in TreeSet throw Exception
body: <p>Why adding <code>null</code> in <code>HashSet</code> does not throw <code>Exception</code>,but adding <code>null</code> in <code>TreeSet</code> throw Exception.</p>
  
  <pre><code>Set&lt;String&gt;  s = new TreeSet&lt;String&gt;();
          s.add(null);
  </code></pre>
  
  <p>throws <code>NullPointerException</code></p>
  
  <pre><code>Set&lt;String&gt;  s = new HashSet&lt;String&gt;();
  </code></pre>
  
  <p>Allow <code>Null</code> value to be added.</p>