title: Why null key is not allowed in TreeMap?
body: <p>I am trying to understand the concept behind Java Collection framework and came along to this question - Why null key is not allowed in TreeMap?</p>
  
  <p>Its giving NullPointerException if we try to add null key in TreeMap. </p>
  
  <p>Tried to google the Internal Working of TreeMap and found something like TreeMap uses RedBlack tree algorithm which is difficult to understand for me right now and I am working on it.</p>
  
  <blockquote>
    <p>TreeMap is a Red-Black tree based NavigableMap implementation.In other
    words , it sorts the TreeMap object keys using Red-Black tree
    algorithm.</p>
  </blockquote>
  
  <p>Please clear me, While other two implementation of the Map interface allows null as a key, then why TreeMap is not allowing to add null as a key?</p>
  
  <p>I would like to thanks for explanation in advance. </p>