Ok, I added println to the run:
public void run()
{
System.out.println(Thread.currentThread());
for(int i = startIndex; i < endIndex; i++)
{
...
Type: Posts; User: Nick7
Ok, I added println to the run:
public void run()
{
System.out.println(Thread.currentThread());
for(int i = startIndex; i < endIndex; i++)
{
...
I want to multiply an array using two threads (which should be done using two cores of a C2D CPU).
The program prints, for example: "0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, Finished,...
Hi ! I want to make a simple math operations on a vector(array) using two cores of my CPU. The program doesn't work correctly. Please explain me how to solve my problem.
public class...