Java unchecked conversion of arraylist
<p>Can anybody tell me how to create an array-arraylist the right way ?!</p>

<pre><code>.\File.java:5: warning: [unchecked] unchecked conversion
        ArrayList&lt;myObjectType&gt; myParkingLotArray[] = new ArrayList[3];
                                                 ^
  required: ArrayList&lt;Vehicle&gt;[]
  found:    ArrayList[]
1 warning
</code></pre>

<p>I want an arry (or any other solution) which stores 3 arraylists. How to add objects to the arrylists would be nice to know too.</p>

<p>ParentArray</p>

<ol>
<li>ChildArrayList1</li>
<li>ChildArrayList2</li>
<li>ChildArrayList3</li>
</ol>

<p>Im happy for any Help</p>

<p><strong>SOLUTION:</strong></p>

<pre><code>public class myClass {
  ArrayList&lt;myObjectType&gt;[] myArryName= new ArrayList[3];

  public void addLists() {
    myArryName[0] =  new ArrayList&lt;myObjectType&gt;();
    myArryName[1] =  new ArrayList&lt;myObjectType&gt;();
    myArryName[2] =  new ArrayList&lt;myObjectType&gt;();
  }
}
</code></pre>

<p>The warning can be ignored or suppressed.</p>