Why we call start method in thread

In java multithreading, it is a important point to understand that why we call start method instead of calling run method directly.

start method:

It starts thread to begin execution, JVM calls run method of this thread.
public void start()
IllegalThreadStateException – if the thread was already started.

We call start method in thread because of the following points:

  • The start() method register the thread with Thread Scheduler.
  • It performs all other mandatory activities for a thread.
  • It invokes the run method.
  • Most importantly, it starts a new thread. If we not use the start method and call the run method directly then no new thread will be created and run method will be treated as a normal method.
Content Protection by DMCA.com
Please Share