Luanrkiran kumar wrote:
ExceptionInInitializerError is a subclass of Error but compilers accept it.I am wondering why? and error is an exception, isn't it?
Afraid that isn't correct. If you look in the Java® Language Specification (=JLS), you will find that both Exception and Throwable are checked.
Vedanshi Priyadarshi wrote:There are three types of exception.......
1) partial checked
2) fully checked
3) unchecked . . . .
That means all exceptions which are not unchecked are checked: there is no partially checked category. The special status of RuntimeException and Error is determined by that part of the JLS, rather than Exception and Throwable having a special status themselves.
That JLS section wrote:The checked exception classes are all exception classes other than the unchecked exception classes.
Stephan van Hulst wrote:I've never head the term "partially checked exceptions" before.
JLS wrote:The unchecked exception classes are the run-time exception classes and the error classes.
The checked exception classes are all exception classes other than the unchecked exception classes. That is, the checked exception classes are Throwable and all its subclasses other than RuntimeException and its subclasses and Error and its subclasses.
Vedanshi Priyadarshi wrote:Sorry to all for all this trouble.
You mean somebody had the bright idea of creating a new category and writing a tutorial about it? I still don't believe that Throwable is checked in part, as that title would suggest.
Shweta Priyadarshi wrote:http://ktutorials.com/java/fully-checked-vs-partially-checked-exceptions-java/