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
Is treeset sorted in java?
Is alive method in java?
What does nextint () do in java?
how is final different from finally and finalize in java?
Is math class static in java?
Differentiate between == and equals().
What is a null point?
How is abstraction implemented in java ?
What is the difference between quicksort & mergesort? When should they be used? What is their running time?
Can we force garbage collector to run ?
Is linkedlist thread safe in java?
How we can declare a static variable?
how do I create a runnable with inheritance? : Java thread
What is the use of coding?
Is 9 a prime number?