What happens if we start a thread twice in java multithreading?

What happens if we start a thread twice is a basic multithreading concepts in java. In fact, we cannot start a thread twice on the same instance of a thread. It is illegal to call start() method of a thread class twice on same instance of a thread. On first call of start() method thread will start working properly, but, on the second call of start() method IllegalThreadStateException will be thrown.

Here is the java code example and output:

Output:

Exception in thread “main” This method is executed by : Thread-1

java.lang.IllegalThreadStateException

    at java.lang.Thread.start(Unknown Source)

     at Sample.main(Sample.java:8)