I am running a program that is supposed to solve a problem with the brute force approach. My computer has a quad-core CPU. When I run the program clearly java uses only one core, because in my program I use only one thread. Is there a way to split up the program in more threads so that more core’s are used and so to improve calculation speed?
I mean: if one has a program which has a natural solution that uses only one thread, is it possible to force it use more threads without completely changing the code?
9