title: Generic Class and passing derived data type
body: <p>I do have a problem in the last line of execution though I pass derived data type. Not able to figure out. Thanks.</p>
  
  <pre><code>     public class ExtendedDHvalue extends DHvalue {}
  
  
  
      public class DerivedHolderUnique&lt;T&gt; {
  
      private Class&lt;? extends T&gt; a;
  
      public DerivedHolderUnique(Class&lt;? extends T&gt; a){
          this.a = a;
      }
  
      public Class&lt;? extends T&gt; getA() {
          return a;
      }
      public void setA(Class&lt;? extends T&gt; a) {
          this.a = a;
      }
  
      public static void main(String[] args){
  
          ExtendedDHvalue eDV = new ExtendedDHvalue();
          DerivedHolderUnique&lt;DHvalue&gt; dhu = new DerivedHolderUnique&lt;DHvalue&gt;(eDV);
      }
  }
  </code></pre>