Reputation: 951
When we invoke the start() then a new thread of execution starts with dedicated call stack.
I'm wondering which is going to be the first method in that call stack: start() or run().
It's mentioned that the Thread is considered to be dead once run() completes.
Upvotes: 0
Views: 907
Reputation: 62469
start
is a method call on the main thread. This means it is on the stack of the main thread. Then inside start
a new thread is actually fired and the run
method is the first method on the new thread's stack.
Upvotes: 3
Reputation: 888185
start()
isn't called on the new thread at all; it only runs on the original thread.
Upvotes: 2