摘要: 1,实例变量,构造器,数组扩展private Object[] contents; private int count; public ArrayBinarySearchTree(Object root) { //Object[] contents = new Object[10]; 悲剧啊!!!!局部变量覆盖了类成员变量 contents = new Object[10]; contents[0] = root; count = 1; } public void expand() { //Object[] larger = new Object[size()*3]; Object[] lar 阅读全文
posted @ 2011-05-15 23:30 jinmengzhe 阅读(2644) 评论(0) 推荐(1) 编辑