Hi Mona,
Now 'am in a fix what r we supposed to mark in the exam.
On the exam, I would say start() does not call run().
I always thought that that the start() calls the run(). Coz i had read somewhere that we do not directly call the run().
We do not know for sure what happens inside start(), because we do not have the source code. start() is a native method.
public synchronized native void start();
----
I assume start() does not call run() for the following reason. Suppose the main() method calls start(). That is, the main thread executes start(). If start() called run(), the main thread would execute run(). But we know for sure the main thread does not execute run(). Instead the new thread executes run().
Two threads execute two different paths through the code. One thread executes start(), the other thread executes run(). Sometimes the virtual machine executes one path, sometimes the other path.
----
I believe the book The Java Programming Language is trustworthy. One of the coauthors is James Gosling, the creator of the Java language.
"The start method spawns a new thread of control based on the data in the Thread object, then returns. Now the virtual machine invokes the new thread's run method, making the thread active."
----
We can almost prove start() does not call run().
The first time, it looks like start() returns and then the virtual machine executes run(). The second time, I increased the priority of the new thread. It looks like the virtual machine executes run() and then start() returns.