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 is the difference between arraylist and hashset in java?
Can a class have 2 constructors?
Is arraylist dynamic in java?
What is an object’s lock and which object’s have locks?
What happens to the Exception object after handling an exception?
What does java ide mean?
What are the approaches that you will follow for making a program very efficient?
Is boolean a data type in java?
What is module in oop?
How are variables stored?
Does java isempty check for null?
What are the restrictions that are applied to the java static methods?
What is overloading and overriding in java?
Explain when classnotfoundexception will be raised ?
Is java still relevant?