title: Binary Search Tree implemented in Java - Find Element recursively
body: <p>Using Java, is it possible to write a recursive method to find an element in a binary search tree? I say no because of the nature of recursive re-tracing back unless I implemented incorrectly? I have been searching the internet and all i can find is an iterative version. Here is my method:</p>
  
  <pre><code>public boolean findValueRecursively(BSTNode node, int value){
     boolean isFound = false;
     BSTNode currentNode = node;
  
     if (value == currentNode.getData()){
        isFound = true;
        return isFound;
     } else if (value &lt; currentNode.getData()){
        findValueRecursively(currentNode.getLeftNode(), value);
     } else{
        findValueRecursively(currentNode.getRightNode(), value);
     }
  
    return isFound;
  }
  
  // Node data structure
  public class BSTNode
  {
      private BSTNode leftNode;
      private BSTNode rightNode;
      private int data;
      public BSTNode(int value, BSTNode left, BSTNode right){
         this.leftNode = left;
         this.rightNode = right;
         this.data = value;
      }
  }
  
  
  
  public static void main(String[] args){
      BST bst = new BST();
      // initialize the root node
      BSTNode bstNode = new BSTNode(4, null, null);
      bst.insert(bstNode, 2);
      bst.insert(bstNode, 5);
      bst.insert(bstNode, 6);
      bst.insert(bstNode, 1);
      bst.insert(bstNode, 3); 
      bst.insert(bstNode, 7);
      if (bst.findValueRecursively(bstNode, 7)){
          System.out.println("element is found! ");
      } else{
          System.out.println("element is not found!");
      }
   }
  </code></pre>
  
  <p>I get the print as "element is not found".</p>
  
  <p>Any help/tips or suggestions, more than welcome. </p>
  
  <p>Thanks in advance!</p>