0% found this document useful (0 votes)
43 views3 pages

Runtimeexception and Error Are The Examples of Unchecked Exception. Fully Checked Exception

There are two types of exceptions in Java: checked exceptions which must be declared and handled, and unchecked exceptions which do not need to be declared. Checked exceptions are reported by the compiler while unchecked exceptions are shown by the JVM. Examples of unchecked exceptions include RuntimeException and Error. Exceptions can also be classified as fully checked if the class and all subclasses are checked, or partially checked if some subclasses are checked and others are not.

Uploaded by

SukantGurav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views3 pages

Runtimeexception and Error Are The Examples of Unchecked Exception. Fully Checked Exception

There are two types of exceptions in Java: checked exceptions which must be declared and handled, and unchecked exceptions which do not need to be declared. Checked exceptions are reported by the compiler while unchecked exceptions are shown by the JVM. Examples of unchecked exceptions include RuntimeException and Error. Exceptions can also be classified as fully checked if the class and all subclasses are checked, or partially checked if some subclasses are checked and others are not.

Uploaded by

SukantGurav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Checked exception:

The exception which is reported by compiler is called as checked


exception.

Unchecked exception:

The exception which is shown by JVM is called as unchecked exception

Rarest to rare exception is called as unchecked exception.

Example:

RuntimeException and Error are the examples of unchecked exception.

Fully checked exception:

-It is the class including itself and its child are checked exceptions.

e.g IOException, ServletException, InterrruptedException

Partially checked exception:

A class and one of its child class is/ are unchecked exception, so that is
called as partially checked exception.

e.g. Exception, Throwable


Class Status
IOException Fully checked
RuntimeException Unchecked
InterrruptedException Fully checked
Error Unchecked
Throwable Partially checked
ArithmaticException Unchecked
NullPointerException Unchecked
Exception Partially checked
FileNotFoundException Fully checked

Structure of try with catch:

-to smoothly the flow of execution.

- to stop abnormal termination of program

You might also like