inserting in binary tree doesn't work using java
问题 I'm currently learning about trees using java and i have some errors going on here in the insertion of items in a binary tree I don't why it doesn't work this is the code: tree node: public class TNode { int data; TNode left; TNode right; public TNode(int data) { this.data = data; left = null; right = null; } } tree class: public class Tree { TNode root; public Tree(){ root = null; } public TNode insertNode(TNode item, int d) { if (item == null) { return new TNode(d); } if (d < item.data) {