I want to get a proxy list and parse it into an array of strings, txt is the proxy list, tmp[] is an array that has element in the form "ipaddr:port". ie. (tmp[] = {"i.p.i.p:port", "i.p.i.p:port", ...}). proxies array should be in 2d and look like this: {{"i.p.i.p","port"}, {"i.p.i.p","port"}, ...} but when running it java complains the following:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 7 at Bot.init(Bot.java:64) at Bot.main(Bot.java:24)
String[] tmp = txt.split(";");
String[][] proxies = new String[tmp.length/2][2];
for(int i = 1; i<tmp.length; i=i+2){
String[] proxy = tmp[i].split(":");
for(int j = 0; j<tmp.length; j++){
for(int k = 0; k<proxy.length; k++){
proxies[j][k] = proxy[k];
}
}
}