Lets take we have a gaming application where a car, a bike and a tower clock runs in individual threads in parallel.
As we know only one thread runs at a time. (context switch happens between threads very fast which makes it look like it is running parallel to human eyes)
Lets assume the game is running in a dual core mobile phone.
Will the 3 threads be shared among by the two cores of the mobile processor?
is there any possibility for the car thread and bike thread to run simultaneously at any point of time ?
is there any possibility for the car thread and bike thread to run simultaneously at any point of time?
Yes, there is a possibility. It depends on the JVM implementation (since you mentionned Java) and the OS implementation, so it's not garanteed, but it's possible.
As we know only one thread runs at a time. (context switch happens between threads very fast which makes it look like it is running parallel to human eyes)
That's wrong. It would be true on a single core single processor, and could be true on some JVM/OS, but is wrong in the general case.
See JLS chapter 17:
Threads may be supported by having many hardware processors, by time-slicing a single hardware processor, or by time-slicing many hardware processors.