Computer Science, asked by sandeep7428971193, 22 days ago

40. What Exception is thrown when you start a thread twice ? (A) InterruptedException (B) NullPointerException (C) IOException (D) IllegalStateException​

Answers

Answered by kalpanakalpana1230
0

Answer:

a..interrupted exception

Answered by ribhur2102
0

Illegal state Exception

Explanation:

  • Signals is that method which has been appeared at an inappropriate or illegal time. In the other words, Java-environment or Java-application is not in appropriate-state for requested operation.
  • After starting or coming a thread, it can never start again. If you try to do so, an Illegal-Thread State-Exception is thrown. In such case, Thread will only run once but for the second time, it will throw the exception.

Similar questions