Find and return a Node in Binary Tree Java
<p>Hi I'm trying to find a node equal to a string given by parametres and return that node. My structure is a binary tree of strings. We assume that the string searched exists. </p>

<p>The var q is inicializated to the root of the tree. (in the function I called the method find)</p>

<pre><code>private NodeTree find(NodeTree q, String cont){
   if(q._contingut.equals(cont)) return q;
   else {
       if(q._left!=null) return find(q._left,cont);
       else if(q._right!=null)return find(q._right,cont);
   }
   return null;
} 
</code></pre>