Can we start a thread twice in java

No, Once you have started a thread, it can not be started again. If you try to start thread again , it will throw IllegalThreadStateException

Lets understand with the help of example:

When you run above program , you will get below output:

As you can see when we started thread twice, it threw IllegalThreadStateException.

If you try to start thread again , it will throw IllegalThreadStateException

You can go through core java interview questions for beginners and experienced for more such questions.

Add Comment