I am new to threads. When run() method is called, will it be executed in a new call stack or in the current call stack. I have a confusion. Please clarify.
Jesper Young wrote:
Each thread has its own call stack, so in the second case, the run() method will be called in a new call stack.
Jesper Young wrote:
(Don't confuse the terms "call stack" and "stack frame" - a stack frame is one set of parameters and return information on a call stack).
Sagar Rohankar wrote:So it means, each Runnable#run() method gets its own call stack ?