Skip to content

Commit e2ea556

Browse files
committed
Fixed recursive call to toString() method in BinaryTreenode class.
1 parent c909d68 commit e2ea556

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chapter06trees/BinaryTreeNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static boolean findInBT(BinaryTreeNode root, int data) {
7171
// Returns a String representation of this BinaryTreeNode.
7272
public String toString() {
7373
if (isLeaf()) {
74-
return this.toString();
74+
return this.toString1();
7575
}
7676
else {
7777
String root, left = "null", right = "null";

0 commit comments

Comments
 (0)