title: Combination Generator in JAVA
body: <p>I am trying to find all combinations of items in several arrays. The number of arrays is random (this can be 2, 3, 4, 5...). The number of elements in each array is random too.</p>
  
  <p>e.g., I have the 3 arrays :</p>
  
  <pre><code>String[][] array1 = {{"A1","A2","A3"},{"B1","B2","B3"},{"C1","C2"}};
  </code></pre>
  
  <p>I would like to generate an array with all possible combinations :</p>
  
  <blockquote>
  <pre><code>A1, B1, C1
  A1, B1, C2
  A1, B2, C1
  A1, B2, C2
  A1, B3, C1
  A1, B3, C2
  A2, B1, C1
  A2, B1, C2 ...
  </code></pre>
  </blockquote>