Difference between run() and start()

Thread.run() similar to Thread.start() What’s the difference?

 the two most significant methods of multithreading are start() and run().

major differences

1. Thread creation

However, if we call the run() function directly, no new thread is generated, and the run() method is executed as a normal method call on the current calling thread, with no multi-threading

2. Multiple invocation

 start() method cannot be performed again without throwing anIllegalStateException    It is never legal to start a thread more than once     In particular, a thread may not be restarted once it has completed execution.  

线程生命周期(Chinese Only)

run() method can call many times since it’s just a regular method call

image.png

Last modified March 8, 2025: interview (3799c36)