0

bin_stree オブジェクトのパブリック関数へのアクセスに問題があります。

src/main.java:

public static void main(String[] args) 
{
        b_node <Integer> root=new b_node <Integer> (10);

    bin_tree <Integer> bt1=new bin_tree<Integer> (root);
        bt1=new bin_stree<Integer>();
        bt1.insert(root,20);//insert doesnt show up as a suggestion in eclipse???


}
src/bin_stree.java: 
public class bin_stree <E extends Comparable <E>> extends bin_tree 
{    
    ...
    public boolean insert(b_node<E> localroot, E target){..}
    ...
}

src/bin_tree.java:
public class bin_tree <E> 
{
     public bin_tree(b_node<E> root)
     {
        this.root=root;
     }
   ...
}
4

2 に答える 2