IllegalStateException in Java

IllegalStateException in Java
IllegalStateException in Java

IllegalStateException in Java

IllegalStateException is thrown from code to indicate that a method has been invoked on an object that is not in an appropriate state to be able to perform the specified operation.


The structure of the class IllegalStateException in Java is given as:


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

IllegalStateException in Java IllegalStateException in Java Reviewed by Animesh Chatterjee on January 07, 2019 Rating: 5

No comments:

Powered by Blogger.