This content has been marked as final. Show 2 replies
You never use the String that you create in each traversal method call, and you don't show us what poly is. So it is hard to tell what you want to do. My guess is that you want to append the value returned from the left and right traversal onto the list String.
list = list + inOrderTraversal(object.left); list = list + object.data; list = list + inOrderTraversal(object.right);