Java error class
Java error class is subclass of throw able class. This mean the application does not able to catch the error occurred in the try block. These error occurred due to abnormal condition. The error class and its subclass define the object to be thrown and the message to be appear what the error occurred. Let us understand a condition stack overflow error occurs when you call a recursive and there is no any way to fix the problem in catch block. The only way to resolve the problem is you need to show the error message that occurred in your code.
Understand with code
In this Tutorial we want to describe you a code that help you in understanding Java error code. For this we have a class name Error class. Inside the main method we assign an instance of error class with a specified detail message.
1)e.getMessage( ) -This method return you an error message string of the throw able object.
2)e.getClass( ) -This method return you an error specified in the class.
Finally the System.out.print ln is used to print the message of the error stored in string variable s as output on command prompt.