numbers, and a program that computes the sum of the numbers, and times how long it takes. The program needs to compare the amount of time it takes to compute the sum vs the # of threads used. The # of threads varies from 1 to 50. Every time it should be comparing the same array of numbers vs the number of threads, so I can see how the
Computer Science
(JAVA computer science)
DO NOT COPY AND PASTE THE ANSWER FROM THE FIRST OR SECOND TIME I POSTED THIS.
THIS IS DONE IN JAVA, NOT C. this is the third time I have to post this.
Using java, make an array of 100,000 random numbers, and a
Please make a global variable that all of the threads can use, and use a single JAVA class.
potential output:
# of threads: X
sum: _____
time: ____
# of threads: Y
sum: _____
time: ____
etc... thanks. (you dont have to include all the numbers for the array, I can generate my own set from a txt file or whatever)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)