What is exception and error? and what is the difference
between them?
Answer Posted / krishnakanth
Exception and Errors are two subclasses of Throwable Class.
Exception:-Exception can be devided into two other groups.
Checked Exceptions and Unchecked Exceptions.
Checked Exceptions are the User defined exceptions and it
must be caught by the user.(Eg:IOException etc.)
Unchecked Exceptions are the subclasses of Runtime
Exception.(Eg:FileNotFound Exception,Division by Zero etc.)
Errors:-Errors are the external interrupts that terminates
the execution of the program.That means Errors ate out of
user control.It can't be catched by the user.(Eg:
OutOfMemory Exception etc.)
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Why vector class is used?
When would you use a static class?
What is nextint java?
What are filterstreams?
Can the interface be final?
Break statement can be used as labels in java?
Which collection allows duplicate values in java?
What is the purpose of skeleton and stub?
how to create constants in java?
Why generics are used in java?
What does string [] args mean?
Give the hierarchy of inputstream and outputstream classes.
What does index mean in java?
What is identifier in java?
Is there a sort function in java?