1.

What is the start() and run() method of Thread class?

Answer»

start(): In simple words, the start() method is used to start or begin the EXECUTION of a NEWLY created THREAD. When the start() method is called, a new thread is created and this newly created thread executes the task that is kept in the run() method. One can call the start() method only once.  

run(): In simple words, the run() method is used to start or begin the execution of the same thread. When the run() method is called, no new thread is created as in the case of the start() method. This method is executed by the CURRENT thread. One can call the run() method multiple times. 



Discussion

No Comment Found