title: Declaring a field extending some type
body: <p>I am having some problems with my syntax. I am looking all over and could not find the correct thing (I actually do not know, what would be the phrase to search). So here is the problem. For simplicity, lets assume I have 4 classes:</p>
  
  <p>class A:</p>
  
  <pre><code>public abstract class A{
  }
  </code></pre>
  
  <p>class B:</p>
  
  <pre><code>public class B extends A{
      //some methods and fields
  }
  </code></pre>
  
  <p>class C:</p>
  
  <pre><code>public class C extends A{
      //some other methods
  }
  </code></pre>
  
  <p>class D:</p>
  
  <pre><code>public class D{
      protected ? value;
  }
  </code></pre>
  
  <p>Here I have a problem, because I do not know what to put instead of <code>?</code> in <code>class D</code>, if I want to define <code>?</code> as some sub-class of <code>A</code>. I know an option is just to write <code>A</code> instead of <code>?</code>, but I think that this could be more specified, for example something like <code>&lt;T extends A&gt;</code>.</p>
  
  <p>Is this even possible?</p>
  
  <p>-edit-</p>
  
  <p>From answers below, I saw that approach would be, to use raw types. But nevertheless, can anyone confirm that a construct like this, does not exist in java? That you could create a field of generic type <code>T</code> (extending some class), but the class containing this field does not have a generic parameter <code>T</code>?</p>