title: get element of Collection knowing the index?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1047957/best-way-to-get-value-from-collection-by-index">best way to get value from Collection by index</a>  </p>
  </blockquote>
  
  
  
  <p>Say I have a <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Collection.html" rel="nofollow noreferrer"><code>Collection</code></a>. And I need to get the element at index 2. </p>
  
  <p>How would I do this if there's no get method and iterator doesn't track indexes? </p>