what is the difference between checked and unchecked
Exceptions?

Answer Posted / aravinda reddy

1) Checked Exceptions extends Exception and
UncheckedExceptions extends RuntimeException.
2) Checked Exception must be caught in the code using try -
catch-finally or declared thrown where as unchecked
exceptions no need to catch or thrown declared
3) None is functionally better than the other
4) Checked Exception is most common excpetions while
coding, so may be authors have made it as mandatory to
handle the excpetion while coding
5) We can create custom checked and unchecked exceptions by
extending Exception and RuntimeException.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS

1655


Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.

1689


Which interface does java.util.hashtable implement?

802


Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword

1695


Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.

1685






Which java collection class can be used to maintain the entries in the order in which they were last accessed?

657


What are the different types of collections views being provided by the map interface? : java collections

689


Should we create system software ( e.g operating system ) in java ?

661


Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance

1989


What are maps interfaces in the java collections? : java collections

663


What are the considerations to be made in case of loops in java ?

689


What are the types of interface used in the java collections? : java collections

669


What are the different types of classes implemented in the set interfaces? : java collections

712


What is the difference between comparable and comparator in java.util pkg?

676


What are the uses of the set interfaces in the java collections? : java collections

632