When a
thread has been instantiated but not started (in other words, the
start()method has not been invoked on the Thread instance), the thread is
said to be in the newstate. At this stage, the thread is not yet considered to be
alive. Once the start()method is called, the thread is considered to be alive
(even though the run()method may not have actually started executing yet). A
thread is considered dead(no longer alive) after the run()method completes. The
isAlive()method is the best way to determine if a thread has been started but has
not yet completed itsrun() method.
Prior to calling start() on a Thread instance, the thread (when we use
lowercase t, we're referring to the thread of execution rather than the Thread class)
is said to be in the new state as we said. The new state means you have a Thread
objectbut you don't yet have a true thread.So what happens after you call start()?
The good stuff:
---> A new thread of execution starts (with a new call stack).
---> The thread moves from the new state to the runnable state.
---> When the thread gets a chance to execute, its target run() method will run.
My first question is (I think before to understand second question I must get the point of my first question)
So What does K&B book want to express by saying "the new state".