title: Iterate through multiple array lists with same index
body: <p>Im a beginner in Java. I have 3 ArrayLists and all of the ArrayLists contain data pertaining to a specific subject and hence have the same length. I want to iterate through the array and perform some operations as illustrated below: </p>
  
  <pre><code>  public void example(){
    ArrayList&lt;Long&gt; ID = new ArrayList&lt;Long&gt;;
    ArrayList&lt;Integer&gt; AcNo = new ArrayList&lt;Integer&gt;;
    ArrayList&lt;Integer&gt; Vnum = new ArrayList&lt;Integer&gt;;
  
    //get ID and AcNo from user, compare it in the ArrayList, get the corresponding Vnum 
    // for the Vnum from previous step, compare it with the next Vnum and get corresponding ID and AcNo until some *condition* is satisfied.
  
    }
  </code></pre>
  
  <p>How do I do this in Java? I saw examples of Iterator, but Im not sure about the correct method to do this! Please help.</p>