Difference between Start and run method in Java thread

Tutorials Shared by the Internet Community

Advertisements


Synopsis

Since start() method calls run() method indirectly, programmer often ask why not directly call run method. well difference between calling run from st

Statistics

  • Total Hits - 26962

  • Total Votes - 115 votes

  • Vote Up - 56 votes

  • Vote Down - 59 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Core JAVA

  • Submitted By - Javin Paul

  • Submitted on - 2012-07-14 14:24:34

Description

Since start() method calls run() method indirectly, programmer often ask why not directly call run method. well difference between calling run from start() and run() is that, start first creates a new thread and then call run() method on new thread while if you call run() method directly than it will be called on same thread and no new thread will be created. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements