Java integer list
<p>I am trying to make java go trough a list of numbers.
It chooses the first one, gives this as output, waits/sleeps like 2000 milliseconds and then give the next one as output, waits 2000 milliseconds, etc.</p>

<p>They should not be listed behind eachother so when my list is:
10
20
30
40
50</p>

<p>It should not give as output: 10 20 30 40 50.
But just 50.</p>

<p>It would be even better if it was able to repeat itself.</p>

<p>So far i tried:</p>

<pre><code>List&lt;Integer&gt; myCoords = new ArrayList&lt;Integer&gt;();
myCoords.add(10);
myCoords.add(20);
myCoords.add(30);
myCoords.add(40);
myCoords.add(50);
Iterator&lt;Integer&gt; myListIterator = someList.iterator(); 
while (myListIterator.hasNext()) {
    Integer coord = myListIterator.next();     
}
</code></pre>

<p>But this has no timer, and i am not sure if this will only show '20' or '10 20 30 40 50' as output.
And i dont really know how to put a sleep/wait command and a repeat command in this :s (might have overlooked the repeat command if its already in)</p>

<p><strong>Edit</strong>
Tyvm all, i can go on with the rest of the coding now :)</p>
