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 :
String[ ] temp = new String[ ] {"http://www.random.org/","http://www.wikipedia.org/", "http://www.jlworld.com/","http://www.frys.com/"};
String[ ] urls = new String[temp.length];
for (int i = 0; i <=temp.length; i++) { urls[i] = temp[i]; }
The crawler needs a string assigned to urls. So like :
String[ ] urls = new String[1];
urls[0] = "http://www.google.com/";
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!