这是一个非常简单的equals方法。
这就是我的代码中的内容:
public boolean equals(Object other)
if (other == null) {
return false;
}
if (!(other instanceof BinaryTree)) {
return false;
}
return this.equalsUtil(this.root,other.root);
}
这是第一个问题
public class BinaryTree {
protected class Node {
//instancee variables and a constructor
}
protected Node root;
//remainder ommited for brevity
我无法调用other.root
(Object other
是equals的参数),那我该怎么做?
请注意,我的课程是public class MyBinaryTree extends Bina