title: Java: how to have an array of subclass types?
body: <p>Say I have a super class "Animal" and subclasses "Cat", Dog, Bird". Is there a way to have an array of subclass type rather than class instances with which I'll be able to instantiate instances of each possible subclass?</p>
  
  <p>To simplify, I want this:</p>
  
  <pre><code>Pseudo code: For each possible subclass of "Animal": create an instance of that class.
  </code></pre>
  
  <p>How can I do that?</p>
  
  <p>Edit: I don't want an array of instances of these subclasses, I want an array of object type.</p>