What happens if you restart a thread that has already started | Eklavya Online

What happens if you restart a thread that has already started

Get the following exception:

Exception in thread “main” java.lang.IllegalThreadStateException

at java.lang.Thread.start(Thread.java:595)

at deadlock.DeadlockTest.main(DeadlockTest.java:38)