I am writing an application in java which involves parallel computing. My question is how can I explicitly assign threads to cores? What is the programming logic for it?
You can't. See this article. The JVM will delegate this to the OS, which will handle it for you.