how to merge two arraylist into one arraylist by index order
<blockquote>
  <p>I have two array lists that hold x amount of equal elements, the idea is to combine both arraylists into one, but I want to add element by element in index order, currently I have this code listed below, but its not very efficient:</p>
</blockquote>

<pre><code>ArrayList &lt;String&gt; listA = ["a", "c", "e"]
ArrayList &lt;String&gt; listB = ["b", "d","f"]
ArrayList &lt;String&gt; listC;
for (int i = 0; i &lt; listA.size() + listB.size(); i++){
    listC.add(listA.get(i));
    lictC.add(listB.get(i));
}
return listC;
</code></pre>

<blockquote>
  <p>output  = ["a", "b", "c", "d", "e", "f"];</p>
</blockquote>