title: Is there a better way to implement those nested loops?
body: <p>Suppose having three arrays:</p>
  
  <pre><code>char [] one = {'a','b','c'};
  char [] two = {'1','2','3'};
  char [] three = {'x','y','z'};
  </code></pre>
  
  <p>If I want to print them like this:</p>
  
  <pre><code>a 1 x
  a 1 y
  a 1 z
  
  a 2 x
  a 2 y
  .....
  c 3 z
  </code></pre>
  
  <p>I must create three nested loops; </p>
  
  <pre><code>for(char i : one)
    for(char j : two)
      for(char k : three)
         //.....
  </code></pre>
  
  <p>Suppose if I have 7 arrays, it will be 7 nested loops.</p>
  
  <p>Is there a better way to do that or an API maybe? I know you're probably asking why you do such a thing, It's just the mater of thinking.</p>