best way to make an array of 2 child classes in java
<p>First off I am new to java and am teaching my self.</p>

<p>my file structure is:</p>

<ol>
<li>ParentClass.java </li>
<li>ChildClass1.java</li>
<li>ChildClass2.java</li>
<li>MyChildClasses.java </li>
</ol>

<p>both ChildClass1 and 2 extend the ParentClass.
and MyChildClasses has a my main method that works with the child classes</p>

<p>In MyChildClasses main looks like this</p>

<pre><code>    ChildClass1[] myClass1 = new ChildClass1[5]
    ChildClass2[] myClass2 = new ChildClass2[5]

    for(int i = 0; i &gt; 5; i++)
    {
        //Setting the ClassID #'s
        myClass1[i] = new ChildClass1((100+i))
        myClass2[i] = new ChildClass2((100+i), (i+1))
    }
</code></pre>

<p>I am wanting to see if there is a way to make this into 1 array that can have both child classes in it?...</p>

<p>making it much easier to print out on screen.</p>
