All About Class Exception in Java


The class Exception and its subclasses are a form of throwable objects that indicates conditions that can be caught using a catch clause in the code.
The structure of the Exception class is given below:

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

}
 
This message is used later to extract information from the Exception.
All About Class Exception in Java All About Class Exception in Java Reviewed by Animesh Chatterjee on September 17, 2018 Rating: 5

No comments:

Powered by Blogger.