I'm learning about Multi-threading and concurrency in Java. Read lots of the posts on stack-overflow and online. But not cleared. So please bear with me.
First my doubt is, some people say number of threads can run in concurrently is equivalent to (n= number of processor cores) Is it correct ? I'm really not sure about this statement.
But I have read that we can create as much threads we want in JVM, it only depends upon the memory we have allocated to JVM. Is it correct ?
How should we decide number of threads to run in parallel for one java program ? Is it related to somewhere the processor cores ?