title: Java code to delete whole Binary tree.
body: <p>I read a postorder traversal application to delete a binary tree and a code which is written in c++.
     I am wondering how to write this code for java. I think we have to set the node as null in postorder way.</p>
  
  <pre><code>void delete(Node root)
  {
      if (root!=null){
          delete(root.left);
          delete(root.right);
      }
      root=null;
  }
  </code></pre>