Computer Science, asked by srishty3, 1 year ago

what is an exception class

Answers

Answered by srijan041
2
The class Exception and its subclasses are a form ofThrowable that indicates conditions that a reasonable application might want to catch.

The class Exception and any subclasses that are not also subclasses of RuntimeException are checked exceptions. Checked exceptions need to be declared in a method or constructor's throws clause if they can be thrown by the execution of the method or constructor and propagate outside the method or constructor boundary.

Answered by Rajdeep11111
2
Exception basically means ERROR HANDLING in Java. Java uses it by two methods: with the throws keyword and the try catch block.
When any error regarding I/O (Input/Output) operations arise, the method creates an object and hands it to the runtime system. This block of code is called as Exception class.

srijan041: Java uses throw, throws, try, catch, and finally keywords.
srijan041: Error need not be only regarding I/O, it can be anything else too.
srijan041: And that is not Exception class, it's a proper .class compiled class under java.lang.Throwable
Rajdeep11111: in which class do u read bro?
Similar questions