Specific Java generic array creation
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5662394/java-1-6-creating-an-array-of-listt">Java 1.6: Creating an array of List&lt;T&gt;</a>  </p>
</blockquote>



<p>How can I initialize this array in Java.</p>

<pre><code>Vector&lt;Integer&gt;[] c;
</code></pre>

<p>I already try:</p>

<pre><code>Vector&lt;Vector&lt;Integer&gt;[]&gt; a = new Vector&lt;Vector&lt;Integer&gt;[]&gt;();
Vector&lt;Integer&gt;[] c = (Vector&lt;Integer&gt;[])a.toArray();
</code></pre>

<p>with the following error:</p>

<blockquote>
  <p>Exception in thread "main" java.lang.ClassCastException:
  [Ljava.lang.Object; cannot be cast to [Ljava.util.Vector;     at
  app.Program.main(Program.java:38)     at
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)     at
  com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)</p>
</blockquote>

<p>EDIT:</p>

<p>My problems is that I am client from a class that receives an generic array "T[] args" argument, and in my case T is a generic type such Vector, Thanks</p>

<p>I am new in Java.</p>
