/** * Returns a String representation of the tree. * The elements are generated from a pre-order traversal of the tree. * @return the String representation of the Tree. */ public String toString() { try { return toList(PREORDER).toString(); } catch(Exception e) { e.printStackTrace(); } return "error"; }