for (int i = 0; i < anArray.length; i++) {
anArray[i] = r.nextInt(10);
}
RecursiveTask<Integer> task = new SumArray(anArray, 0, anArray.length);
ForkJoinPool mainPool = new ForkJoinPool();
Future<Integer> future = mainPool.submit(task);
System.out.println(mainPool.getActiveThreadCount());
System.out.println(mainPool.getStealCount());
System.out.println(future.get());
}
}