Using a for loop to count size or List<string>?
<p>I have a for loop in which i test for the size of a list.</p>

<pre><code>for(int i = 0; i&lt; thumbLinks.size(); i++) {
                        Log.e("URL" + i, thumbLinks.get(i));




                 url0 = thumbLinks.get(i);
                 url1 = thumbLinks.get(i); 

                 //Fix index out of bounds exception
                 url2 = thumbLinks.get(i);



              }
</code></pre>

<p>When i is added each time as you can see i am asking for i 3 times to get 3 urls. Since i am unsure about how many URL's i will have. I use i to increase.
The correct output i want is for </p>

<pre><code>    url0 = thumbLinks.get(i);// which is support to be equivalent to 1
    url1 = thunkLinks.get(i);//which is suppose to be equivalent to 2
</code></pre>

<p>and so on..</p>

<p>But my code doesnt do this...</p>

<p>It just adds 1 each time to each url.
How can i fix this
?</p>
