printTree will call a recursive method