title: List of Classes in Java
body: <p>I have multiple classes (B, C and D) that are subclasses of class A. I need to make a List/Array containing B, C and D and create Objects based on whatever element I pull from the List/Array.</p>
  
  <p>In AS3 I would do something like this: var classes:Array = [MovieClip, Sprite, Shape]; or a Vector of Classes.</p>
  
  <p>How do I do this in Java?
  I'm thinking about something like this right now:</p>
  
  <pre><code>List&lt;Class&lt;? extends A&gt;&gt; list = new ArrayList&lt;Class&lt;? extends A&gt;&gt;();
  
  list.add(B);
  </code></pre>