title: How to mix two arrays in Java?
body: <p>I have some String[] arrays, for example:</p>
  
  <pre><code>['a1', 'a2']
  ['b1', 'b2', 'b3', 'b4']
  ['c1']
  </code></pre>
  
  <p>How can I mix them, so that I get <code>['a1', 'b1', 'c1', 'a2', 'b2', 'b3', 'b4']</code> (0 element of a, then b, c, 1 element of a, b, c and so on)? Thanks</p>
  
  <p>More accurately the resulting array must consist of the first value of the first array, then the first value of the second array, ..., the first value of the last array, the second value of the first array, ..., the second value of the last array, ..., the last value of the biggest array. If arrays are not of the same size, the smaller ones just aren't being taken into account.</p>
  
  <p>Here's an illustration: </p>
  
  <pre><code>a1 a2 a3 a4
  b1 b2 b3 b4 b5 b6 b7
  c1 c2
  d1 d2 d3 d4 d5
  
  Combines into (brackets are just to highlight steps, so they really mean nothing):
  (a1 b1 c1 d1) (a2 b2 c2 d2) (a3 b3 d3) (a4 b4 d4) (b5 d5) (b6) (b7)
  </code></pre>
  
  <p>Also, I'd like to combine variable number of array, not just 3 or 4</p>