Question: Java question help please What does the mystery() method print when called on the root of the above BinaryTree? class BinaryTree {int data; Binary Tree
Java question help please
What does the mystery() method print when called on the root of the above BinaryTree? class BinaryTree {int data; Binary Tree left; BinaryTree right; public void mystery() {if (data > 5) {if (left!=null) {left.mystery();} if (right!=null) {right.mystery();} System.out print(data); System.out.print(", ");}}}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
