Difference between start() and run() method of Thread class ?
When we invoke start() method a newly created thread is started, while start() internally calls run() method.
Declaration of start() method :
public void start() .
It is never legal to start a thread more than once. In particular, a thread may not be restarted once it has completed execution.
When we invoke run() method, its called in the same thread, no new thread is started.
Declaration of run() method :
public void run()
Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.
This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.
This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.
Java I/O Tutorial

No comments:
Post a Comment