binary trees call itself to traverse the node' left subtree visit the node call itself to traverse the node' right subtree remember that visiting node means doing something to itdisplaying itwriting it to fileor whatever traversals work with any binary treenot just with binary search trees the traversal mechanism doesn' pay any attention to the key values of the nodesit only concerns itself with whether node has children java code for traversing the actual code for inorder traversal is so simple we show it before seeing how traversal looks in the workshop applet the routineinorder()performs the three steps already described the visit to the node consists of displaying the contents of the node like any recursive functionit must have base case--the condition that causes the routine to return immediatelywithout calling itself in inorder(this happens when the node passed as an argument is null here' the code for the inorder(methodprivate void inorder(node localrootif(localroot !nullinorder(localroot leftchild)system out print(localroot idata ")inorder(localroot rightchild)this method is initially called with the root as an argumentinorder(root)after thatit' on its owncalling itself recursively until there are no more nodes to visit traversing three-node tree let' look at simple example to get an idea of how this recursive traversal routine works imagine traversing tree with only three nodesa root ( )with left child ( )and right child ( )as shown in figure