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
What's the base class of all exception classes?
What are the four integer types supported by java?
What is an exception? difference between Checked and Unchecked exception in Java
How do you reverse a string in java?
Can you override a final method?
What is a JAR file?
How to calculate the length of a singly linked list in java?
What is break and continue statement?
What is native method in java?
Are maps ordered java?
What is a generic type?
Is array size fixed in java?
Can we create constructor in abstract class ?
Is java platform independent?
Is cout buffered?