what is difference between checked and unchecked exception
plz explain examples ?

Answer Posted / brahmi

Unchecked Exceptions :

Unchecked exceptions are RuntimeException and any of its
subclasses. Class Error and its subclasses also are
unchecked.
Unchecked runtime exceptions represent conditions that,
generally speaking, reflect errors in your program's logic
and cannot be reasonably recovered from at run time.
With an unchecked exception, however, compiler doesn't
force client programmers either to catch the exception or
declare it in a throws clause.
The most Common examples are ArrayIndexOutOfBoundException,
NUllPointerException ,ClassCastException

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is awt and swing?

545


What is swing api?

531


What are the differences between Swing and AWT?

571


How to add calendar in java swing using eclipse?

779


Why swings are called lightweight components?

526






Which layout does swing use by default?

498


What are the advantage of swing over awt?

503


What is swing delegation event model in java?

552


What is the mean of swing?

499


What are the different components that are used to show a container?

542


What is a component in swing?

505


What is java swing used for?

534


How to move from one page to another in java swing?

619


What is java swing components?

534


How is parsing html used in swing?

561