What is exception and error? and what is the difference
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|
What is contract between hashcode and equal method?
What does %d do in java?
Can a list be null in java?
Can you pass functions in java?
Is singleton class thread safe?
What are different access specifiers in java?
Why string objects are immutable in java?
How is treeset implemented in java?
What are streams?
What is double data type?
How to print an arraylist in java?
How many decimal digits is 64 bit?
What is blank final variable?
How do you do math powers in java?
Can we convert integer to string in java?