title: How to create an array of vector in Java?
body: <p>So, I want an array of Vector of Integer in Java.</p>
  
  <p>If I put</p>
  
  <pre><code>Vector&lt;Integer&gt;[] matrix;
  matrix = new Vector&lt;Integer&gt;[100];
  </code></pre>
  
  <p>I get cannot the compilation error </p>
  
  <blockquote>
    <p>cannot create a generic array of Vector</p>
  </blockquote>
  
  <p>Should I use</p>
  
  <pre><code>    matrix = new Vector[100];
  </code></pre>
  
  <p>instead? (which gives a warning)</p>
  
  <p>Or should I simply not use an array of vectors and use vector of vector instead?</p>
  
  <p><strong>Note: I don't want a Vector&lt; Integer >, I want a Vector&lt; Integer >[] to create a matrix of Integers without using Integer[][].</strong></p>