title: How does recursion works here?
body: <p><strong>This is the main file:</strong></p>
  
  <pre><code> public static void main(String[] args) {
   BTFunction bt=new BTFunction();
   bt.insert(5);
   bt.insert(15);
   bt.insert(10);         
   bt.insert(7);
   }      
  </code></pre>
  
  <p><strong>This is the class BTFunction:</strong></p>
  
  <pre><code>public class BTFunction {
  BTNode root=null;
  
  void insert(int data){
  root=BTinsertion(data,root);
  
  }
  
  BTNode BTinsertion(int data,BTNode n){
      if(n==null){
          n=new BTNode(data);
      }
      else{
              if(n.right==null)
              n.right=BTinsertion(data,n.right);   
              else
              n.left=BTinsertion(data,n.left);   
          } 
      return n;
      }
  </code></pre>
  
  <p>I understand the first 3 insertions(i.e. root, right and left) but when a new value(i.e. 7) is inserted, how does the function works. 
  According to me when insert(7) is implemented, it should just search for root.next and root.right which both are not null now. So, it should not do anything.</p>
  
  <p><strong>Can you explain the recursive process, specially when more values are added.</strong></p>