title: Java - multidimensional array of vectors of generic type
body: <p>Imagine, if you will, a 10x10x10 cube made out of 1x1x1 bricks. Each brick must be accessable by an x,y,z coordinate. For each brick I also need to store a list of names of who own that 'brick'.</p>
  
  <p>As efficiency is an absolute must, I came up with the following idea - A 3d array of vectors.
  note- I have made a class which stores a name, and other info (called person)</p>
  
  <pre><code>//declaration
      protected Vector&lt;person&gt;[][][] position;
  </code></pre>
  
  <p>I think I must then allocate memory to the pointer <em>position</em>. I have tried this</p>
  
  <pre><code>position = new Vector&lt;person&gt;[10][10][10]; 
  </code></pre>
  
  <p>But am getting an error 'Cannot create a generic array of Vector' I am only familiar with C++ and Java is new to me. I understand java does not like declaring arrays with generic type? Does anyone know how I can get around this problem? </p>
  
  <p>Cheers</p>