Homework gone wild : "Cannot create a generic array of AbstractChain<T>" : <p>So this is an exercice given by my teacher. We're creating a SkipList, aka a "LinkedList" with shortcuts.
He gave us a class diagram with one interface (AbstractLink) and three class (StartLink and EndLink implement AbstractLink while Link extends StartLink).
He also gave us a huge part of the code but i find it surprising that the interface is empty, i dont really understand why it is and he doesn't look like we need to fill it.
Anyhow, in the StartLink, he told us to write the constructor.</p>

<p>So i tried to initialize nexts, which is an array of AbstractLink (???), with the parameter n.
As far as I searched, it's impossible to do it because the type of the AbstractLink is not defined. But it leaves me clueless with what i have to change ...</p>

<pre class="lang-java prettyprint-override"><code>public interface AbstractLink&lt;T extends Comparable&lt;T&gt;&gt; extends Comparable&lt;AbstractLink&lt;T&gt;&gt; {

}
</code></pre>

<pre class="lang-java prettyprint-override"><code>public class StartLink&lt;T extends Comparable&lt;T&gt;&gt; implements AbstractLink&lt;T&gt; {

    final AbstractLink&lt;T&gt;[] nexts;

    public StartLink(int n){
        this.nexts = new AbstractLink&lt;T&gt;[n];    //my line
    }

</code></pre>

<p>And Eclipse gives me this :
Cannot create a generic array of ChainonAbstrait</p>

<p>Thanks in advance</p>
