All About Class IllegalThreadStateException in Java

IllegalThreadStateException is thrown from a code to indicate that the thread is not in an appropriate state for the required or requested operation. Example- The thread may be already started and running when we want to start the same thread.
The structure of the class is as follows:


public class java.lang.IllegalThreadStateException extends java.lang.IllegalArgumentException{
//constructor
public IllegalThreadStateException();
//constructs an empty IllegalThreadStateException object that is an object with no message specified.
public IllegalThreadStateException(String message);
//constructs an IllegalThreadStateException object with the message specified.

}
 
All About Class IllegalThreadStateException in Java All About Class IllegalThreadStateException in Java Reviewed by Animesh Chatterjee on September 17, 2018 Rating: 5

No comments:

Powered by Blogger.