Multithreading in java watch online session on youtube in Hindi)
How to create thread in javawatch online session on youtube in Hindi)
What is runtime stack in Java?watch online session on youtube in English)
Sleep Method in Java ?watch online session on youtube in English)
What is Java Lock? Or Synchronizationwatch online session on youtube in English)
What is Thread Group in Java?watch online session on youtube in English)
What is the difference between start() method and run() method in Java multithreading?
In the case of t.start() a new thread will be created which is responsible for the execution of run () method.
But, in the case of t.run() a new thread will not be created and run() will be executed just like a normal method called by the main method.
Hence, in the previous program if we replace t.start() with t.run() then out is as follow:
Child thread is running(10 times)
the main thread is running(10 times)
This total output produced by an only main thread.