what is the difference between checked and unchecked
Exceptions?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
please mail me the interview question based on java/j2ee
Runining mutiple tomcat server in a single machine is possible Yuo wil have to duplicate configuration with different port numbers
What are the different types of ways where you can iterate over a list? : java collections
What are the different types of features of the java collections framework? : java collections
what is the difference between banking and insurance domain?
what is hibernate ceteria ?
Write a interface "CarOperations" with the following methods void turnOnEngin() void turnOffEngin() void turnOnLigths() void turnOffLights() void turnLeft() void turnRight() void accelerate() void deaccelerate() void putBreaks() void releaseBreaks()
my interviewer asked me what technical specification you used how to answer that question
I have include a jsp page by using <jsp:include page="/.../xyz.jsp"/> The thing is that the xyz.jsp page has its submit button.When i click on that button the whole main page get refreshed.But i want to refresh only the xyz.jsp page.How could i achive it so that i can only refresh the xyz.jsp not the main page page?
What do you understand by synchronization? Why is it important?
What are the main classes of the list interfaces? : java collections
Which interface does java.util.hashtable implement?