title: How to use multi dimensional vector in java?
body: <pre><code>Vector v1 = new Vector();
  for (int i = 0; i &lt; 7; i++){
      v1.add(new Vector());
  }
  Vector WordTemp = new Vector();
  for (int i = 0; i&lt; 3; i++){
      WordTemp.add(v1);
  }
  </code></pre>
  
  <p>Firstly I create a 3 dimensional vector. 
  I want to put word to vector WordTemp indexed by two dimensions. Can I write the code like this?</p>
  
  <pre><code>for (int i = 0; i&lt; 3; i++){
      for (int j = 0; j &lt; 7; j++){
          ((Vector) ((Vector) WordTemp.get(i)).get(j)).add(word);
     }
  }
  </code></pre>
  
  <p>After I create this vector space. can I read it like this?</p>
  
  <pre><code>...for (int i = 0; i&lt;7; i++){
         ListIterator iter2 = ((Vector) ((Vector) WordTemp.get(t)).get(i)).listIterator();
         while(iter2.hasNext()){
             String CompareStr = (String) iter2.next();....
  </code></pre>