CodesJava

Easy learning with example program codes

difference between thread start and run method


Let’s discuss the differences between start and run methods in details.

Difference between start and run method in java:

                       start method                          run method
  1. It starts thread to begin execution, JVM calls run method of this thread.
  2. public void start()
  3. A new thread will be created and it is responsible to complete the job.
  1. It is used to perform operations by thread.
  2. public void run()
  3. No new thread will be created and main thread will be responsible to complete the job.

 

Related Topics:

Please follow and like us:
Posted in Java   

Core Java Tutorial



Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki