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
Do I need to import java.lang package any time? Why?
What is isa relationship?
How strings are created in java?
Explain about interrupt() method of thread class ?
What is variable explain with example?
What does opcode mean?
Can we have try without catch block?
What is the static import?
What are different types of classloaders?
Explain the difference between throw and throws in java?
Why char array is favored over string for the storage of passwords?
What is variable explain?
What is an i/o filter?
What does sprintf return?
What is identifier give example?