1. Understand what we're dealing with and how it works. 2. Create a public static SortThread class, whose run method uses the sort method to sort the static array testArray.
Faster together? We'll see :)
You must be signed in to leave a comment
17 September 2021, 22:37
There are some interesting things to learn in this task, but contrary to the task name, there is no measuring of the passage of time here. One of the things that is interesting... the process becomes more inefficient later in the loop. When I ran this, it counted from 999 to 990 before it ran into any problems. I scrolled all the way to the end of the output line and found many repeated digits at the end - it could not even get more than two numbers in a row correctly and every number displayed was repeated at least 3 times. Would be interested in the explanation for this.
Hưởng Nguyễn Công
18 October 2019, 07:36
:D, is that a trap? I have tried to measure the time it take when it calculates, The amazing thing is 10 threads takes twice as much time as the one thread when calculation, even when my computer has 4 cores.
15 October 2020, 07:20
Did you use Thread.join()?
7 July 2019, 10:09
I solve it but i have no idea what i did :\
22 March 2021, 14:10
Same here :D