0
How i can make more thread to do same loop task without repeat ? I want to increase speed of my code
thread th = new thread(); public void run(){ for(int i=0;i<=10000;i++){ try { URL url = new URL(i // here i meant that every loop url chang); URLConnection yc = url. openConnection(); BufferedReader br = new BufferedReader( new InputStreamReader(yc.getInputStream())); String inputline; while((inputline=br. deadline())!=null) { if (inputline. contains("j")){ //do somthings } } } catch {} } }};th. start
2 Answers
+ 1
create new threads with the loop than url
0
how this?