import java.util.*;
public class test{
public test(){
int[] list = new int[]{1,2,3,4,5,6};
ArrayList<Integer> myList = new Arrays.asList(list);
//list with 6 numbers that require 3 threads
}
public static void main(String[] args){
new test();
}
}
For every two numbers in my list, i want to have a thread. i.e if their are 6 numbers, 3 threads should be detedted automatically. What must i do to automatically create Threads?