In a java program, thread scheduler switches between threads rapidly so we get the feeling of many tasks happening at the same time when its actually not the case.
However if our computers have multiple central processing units (CPUs), would that mean the threads actually processed parallel without the above mentioned switching?
Justification against the possible duplicate suggestion: I am asking whether the java program is able to utilize the multiple cores as opposed to that question's "how does JVM make use of multiple cores?"
Yes, using multiple threads in Java on a machine with multiple physical processors will result in actual parallel processing, unless you specifically tell the O/S to force all of your application's threads to run on the same physical processor.