Index out of bounds error ArrayList : <pre><code>    for (int i = 0; i &lt; totalArray.size(); i++){

        studentNumber.add(Long.parseLong(totalArray.get(i * 3)))
        lastName.add(totalArray.get((i * 3) + 1));
        firstName.add(totalArray.get((i * 3) + 2));
</code></pre>

<p>I'm not sure what is going on here. I've getting an index out of bounds error on this code. totalArray.size() is 42 however I'm getting the error at index 42 with the second line (parseLong).</p>
