

Hi,
Here is the answer of the question.
The start() method performs some other actions before calling the run() method. The start() method starts the execution of the new thread and calls the run() method. The start() method returns immediately and the new thread normally continues until the run() method returns.
If we call run() directly, no separate thread will be created and it is just like calling any other method of the class which will be executed in the same thread.
Here is the example:
public class MyThread extends Thread {
public void run() {
for (int i = 0; i < 5; i++) {
System.out.println("within run");
}
}
public static void main(String[] args) {
MyThread mt = new MyThread();
MyThread mt1 = new MyThread();
mt.start();
mt1.run();
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.