title: Java accessing specific element in array of strings
body: <p>I am running a web crawler for my own use. I downloaded one and want to provide it with seeds. I want to provide it with around 50 seeds. So I created an array of strings. I want to provide the crawler with 1 seed each time it goes through my for loop. My code is :</p>
  
  <blockquote>
    <p>String[ ] temp = new String[ ]
    {"http://www.random.org/","http://www.wikipedia.org/",
    "http://www.jlworld.com/","http://www.frys.com/"};</p>
    
    <p>String[ ] urls = new
    String[temp.length];</p>
  
  <pre><code>  for (int i = 0; i &lt;=temp.length; i++)       
       {          
          urls[i] = temp[i];      
       }
  </code></pre>
  </blockquote>
  
  <p>The crawler needs a string assigned to urls. So like :</p>
  
  <blockquote>
    <p>String[ ] urls = new String[1];</p>
    
    <p>urls[0] = "http://www.google.com/";</p>
  </blockquote>
  
  <p>So it works like that. I get an outofbounds exception though for my code. What I want to do is provide the crawler with 1 of the seeds each time it goes through the for loop. Any help on this would be appreciated!</p>