Passing a List Iterator to multiple Threads in Java
问题 I have a list that contains roughly 200K elements. Am I able to pass the iterator for this list to multiple threads and have them iterate over the whole lot, without any of them accessing the same elements? This is what I am thinking of at the moment. Main: public static void main(String[] args) { // Imagine this list has the 200,000 elements. ArrayList<Integer> list = new ArrayList<Integer>(); // Get the iterator for the list. Iterator<Integer> i = list.iterator(); // Create MyThread,