What is checked and unchecked exception? How can we know that any exception is checked or unchecked?

Showing Answers 1 - 5 of 5 Answers

SangeethKrishna K

  • Sep 22nd, 2006
 

In java there are possibly two kinds of exceptions be raised! - ->Checked A Cheched exception is a compile time exception ,whick is tackeld by the compiler! --->Unchecked An unchecked exception is somethin that is raised at run time! eg...Stack overflow, etc

  Was this answer useful?  Yes

devi

  • Sep 22nd, 2006
 

here exception will be checked by using try,catch blocks in the program

  Was this answer useful?  Yes

shadab_mca1

  • Sep 25th, 2006
 

Those Exception which are required to show in throws list i.e those exceptions which compiler can not check without throw keyword are kwon as Checked Exception.

runtime execption have a subclass which are not required to be checked i.e compiler can check them which exception to be raised are known as unchecked exception.

All exception are defined in java.lang package

  Was this answer useful?  Yes

Kalyan Chakravarthy

  • Oct 6th, 2006
 

Compiler will be having the list of checked exceptions.If the client's program generates these exceptions then the compiler compels the client to handle the exceptions.

examples:ClassNotFoundException,InterruptedException,IllegalAccessException

Where as Unchecked exceptions are ignored by the compiler.The user need not handle these exceptions.These will be handled by the default handler at run time. 

examples:All RuntimeExceptions,Errors and their subclasses

  Was this answer useful?  Yes

Sayeed

  • Jan 25th, 2007
 

Cheched are those which are written in its package

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions