I'm trying to find a specific node in a binary tree using Java. My method for finding the node returns the node that contains the data that was searched for.

My code looks like this:

```
    public BinNode find(Comparable item) throws NullPointerException {
        if (item == null) {
            throw new NullPointerException("item is NULL");
        } else if (root == null) {
            throw new NullPointerException("tree is empty");
        }
        return find(root, item);
    }

    public static boolean found = false;
    public BinNode find(BinNode k, Comparable item) throws NullPointerException {
        if (k.getData().equals(item)) {
            found = true;
            return k;
        }
        if (!found && k.getChildLeft() != null) {
            find(k.getChildLeft(), item);
        }
        if (!found && k.getChildRight() != null) {
            find(k.getChildRight(), item);
        }
        return k;
    }

```

Running the debugger I can see, that when I search for an item that exists in the tree, it will find the correct node and go to the first return statement after "found" is set to true.
However, then compiler doesn't return that Node to the method call, but goes on to the second return statement, returning the root. So no matter where the Node is located, the method will always return the root.

What am I doing wrong?