what is the difference between checked and unchecked
Exceptions?

Answers were Sorted based on User's Feedback



what is the difference between checked and unchecked Exceptions?..

Answer / 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

what is the difference between checked and unchecked Exceptions?..

Answer / rohit

checked exceptions are error is suppose source file is
open... unchecked exception are error i.e array index out of
bound..thats all checked exception occur at compile time and
unchecked exception occurs at run time.

Is This Answer Correct ?    12 Yes 2 No

what is the difference between checked and unchecked Exceptions?..

Answer / santosh mundhe

Unchecked Exception(Runtime Exception):
there is no need to declare runtime exceptions, in simple
words we can say that at run time JVM will handle the
exception.

Checked Exception(Compiletime Exception):
at compile time JVM will check for exception for that it's
compulsory to handle the exception.Checked exceptions force
you to catch the exception and to do something about it.

Is This Answer Correct ?    7 Yes 1 No

what is the difference between checked and unchecked Exceptions?..

Answer / surya bondada

The exception which are checked by the complier are called
as checked exception.
The exception which are not checked by the complier are
called as unchecked exceptions.

Example for Checked Exceptions are:Exception,intrupted
Exception,serveltException,Io Exception and all child
classes are the examples for checked Exceptions.

Example for Uncheked Exceptions are:Runtime Exception it is
child of Exception,and child classes of Runtime Exceptions
like ArrayIndexOutofOrder,illegalmonitersafe
exception,illegal argement exception,Arthimatic
exception,and class cast exception,And All Error and child
classes are example for unchecked .

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Java J2EE AllOther Interview Questions

Difference between Spring framework and Struts framework?

12 Answers   IBM, L&T, VAM,


httt method

2 Answers   HCL,


i need java 1+ experience resume on java developer kindly send me my mail id:srikanthreddy1.marla@gmail.com

1 Answers  


When to use the Collection Classes(HashSet, LinkedHashSet, TreeSet....etc) in real time scenario ?

1 Answers   Cap Gemini,


How is hashset maintained in memory by java ?

0 Answers  






Q1. A. Write note on "The class path Environment Variable". B. Which are different kinds of source code? Q2. A. How to create an interface? B. Why convert an applet to an application? Q3. A. How to use Media tracker Class. B. How to use string tokenizer class. Q4. A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on "The properties class" Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.

1 Answers  


which book is the best for preparing for SCWCD 1.5

4 Answers   Google,


How do I find jre path in windows?

0 Answers  


What causes Out of Memory exception?

5 Answers   CTS,


what is class/object diagram

3 Answers   Zycus Infotech,


What is difference between Application Server and Web Server?

1 Answers   Logica CMG, SCS,


what is acl(access control list)?

1 Answers   Athena, HCL,


Categories