I am creating an interface and an implementation of linked list like so in Java 1.8:
public interface MyList<E extends Comparable<E>> {
.....
}
public class MyListImpl<E> implements MyList<E extends Comparable<E>>{
......
}
The interface has no compiler issues but the MyListImpl
is giving an error Unexpected Bound
where I have E extends Comparable<E>>
. I am not sure why this error is happening though.