Generics itself Generics
<p>I am not able to create Class with Generics. I want generic type parameter for the class, which itself accept generics as shown. Is there any way to achieve this?</p>

<pre><code>public class Node&lt;D, C&lt;D,C&gt;&gt; {
    D data;
    C&lt;D,C&gt; children;

    public D getData() {
        return data;
    }

    public void setData(D data) {
        this.data = data;
    }

    public C&lt;D,C&gt; getChildren() {
        return children;
    }

    public void setChildren(C&lt;D,C&gt; children) {
        this.children = children;
    }
}
</code></pre>
