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
How the interruptible method gets implemented?
Can we make constructors static?
What is a package in java? List down various advantages of packages.
What exactly is methodology?
How do you control extraneous variables?
What data type is a string?
Which java version is latest?
What are meta-annotations?
What are the approaches that you will follow for making a program very efficient?
What is integer parseint?
How many bits is a double?
What is the difference between instanceof and isinstance?
Explain the difference between treeset and treemap in java?
What does sprintf return?
Explain about static nested classes in java?