Question: I'm trying to make an abstract class `AbstractBinSearchTree` like this:

```
public abstract class AbstractBinSearchTree<E extends Comparable<E>>
{ 
   public abstract void add(E element);
   public abstract void add(Collection<E> elemente);

   public List<E> retrieveInOrder(Pos<E> p) {
   ...
   }

```

My question is now how to extend from this class. I want to make an `ArrayBinTreeSearch` which I can instantiate like this: 

```
AbstractBinSearchTree<Elem> tree = new ArrayBinSearchTree<Elem>();

```

I tried this:

```
public class ArrayBinSearchTree<E extends Comparable<? super E>> extends AbstractBinSearchTree<Comparable<E>>{

Comparable<E>[] _tree;

public ArrayBinSearchTree(int size)
{
    _tree = new Comparable[size];
}

@SuppressWarnings("unchecked")
@Override
public void add(Comparable<?> element) {
    ...
}

```

But I doesn't really feel like this is the correct way to use it. Also I cannot instantiate like I mentioned above.

Answer: 
I believe you need to replace the following line:

```
public class ArrayBinSearchTree<E extends Comparable<? super E>> extends AbstractBinSearchTree<Comparable<E>>{

```

With:

```
public class ArrayBinSearchTree<E extends Comparable<? super E>> extends AbstractBinSearchTree<E>{

```

Otherwise you'll restrict the parameters of any methods in `AbstractBinSearchTree`. In addition, expand the generic type of `AbstractBinSearchTree` as follows:

```
public abstract class AbstractBinSearchTree<E extends Comparable<? super E>>

```

Also, your ArrayBinSearchTree constructor has an `int` parameter:

```
AbstractBinSearchTree<Elem> tree = new ArrayBinSearchTree<Elem>(5);

```

And can be replaced by diamond syntax:

```
AbstractBinSearchTree<Elem> tree = new ArrayBinSearchTree<>(5);

```

Assuming you're using Java 7 or higher
Comparable it's interface,then you must to change "extends" to "implement"