Implement the following method using the Fork/Join Framework to assign random values to the list.
public static void parallelAssignValues(double[] list)
Write a test program that creates a list with 9,000,000 elements and invokes parallelAssignValues to assign random values to the list. Also implement a sequential algorithm and compare the execution time of the two. Note that if you use Math.random(), your parallel code execution time will be worse than the sequential code execution time because Math.random() is synchronized and cannot be executed in parallel. To fix this problem, create a Random object for assigning random values to a small list.
Enjoy 24/7 customer support for any queries or concerns you have.
Phone: +1 213 3772458
Email: support@gradeessays.com