title: Get a random element from a sequential collection
body: <p>I talk to an API that gives me an <code>java.util.Iterator</code> over a collection. That means I can iterate over it but I can't get direct/random access to the elements.</p>
  
  <p>Now to my problem: I want to get one random element from this collection. How do i do that? I guess I could build a new collection that allows direct access, but isn't that a little memory consuming? I could also iterate over the entire collection and for each element "roll a dice" to see if I should take that element and quit iteration or continue. But then I need the size of the collection and I can't get that from the Iterator.</p>
  
  <p>Thanks in advance.</p>