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
How do I find jre path in windows?
who will give req's to u?. how they send req's to u? . what design documents contains?. when bugs raised on other developer code how to report to them?.(throgh mail or ........). how to retrive 100 recods from dao layer to presentation layer.using which collection?. what is sequence diagram.?.
my interviewer asked me what technical specification you used how to answer that question
What are the considerations to be made in case of loops in java ?
What is the use of hashcode in java ?
Which sorting algorithm is used by collections.sort() in java ?
What are the differences between the java collection and the java list? : java collections
What are the types of java collections? : java collections
What is the enumerator of the java collection framework? : java collections
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
Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword
What are the different types of collections views being provided by the map interface? : java collections
What are the different types of ways where you can iterate over a list? : java collections
What are the main classes of the list interfaces? : java collections
Hi we have an urgent requirement for Java/J2ee technical lead position & also looking for "Java Guidewire claimcentre" experienced professional for Bangalore location if interested can reach srisanh@gmail.com