title: Java create Multidimensional Array from Array
body: <p>I'm having an Array <code>Object[]</code> with Elements like:</p>
  
  <pre><code>Foo A
  Foo B
  Foo C
  notFoo A
  notFoo B
  notFoo C
  </code></pre>
  
  <p>I want to create an multidimensional array from this like:</p>
  
  <pre><code>Object[0][] = {Foo A, Foo B, Foo C}
  Object[1][] = {notFoo A, notFoo B, notFoo C}
  </code></pre>
  
  <p>So if an Element in this Array has in it's first token (eg. Foo) a Name which didn't appear before it's stored in another indece.</p>
  
  <p>So the first token indicates the "Element suite", which leads to another index in the array.</p>
  
  <p>Any ideas how to do it?</p>
  
  <p><strong>EDIT:</strong> The elements are of type String.</p>