public void display() {
for (int i = 1; i < maxSize; i++)
System.out.println("Node: " + i + " " + Btree[i]);
}
}作者: 方贤银 时间: 2011-10-17 20:50
它的遍历:public class Tree {
public static void main(String[] args) {
int data;
DNTtree dtree = new DNTtree();
BufferedReader buf = new BufferedReader(
new InputStreamReader(System.in));
try {
System.out.print("请输入一个数值:");
data = Integer.parseInt(buf.readLine());
dtree.data[0] = data;
while (true) {
System.out.print("请输入一个数值:");
data = Integer.parseInt(buf.readLine());
if (data == 0)
break;