what is difference between Exception and Error?

Answer Posted / pranab garai

Exceptions are also kind of errors which we can hadle at
both compile time and run time by using try and catch
blocks.
These are two types: Compile time and runtime.
Sql and IO operations are come under compile time array
index out of bounds and null pointer these are come under
runtime exceptions

Errors are the problems which we cant hadle, like stack
overflow and memory out of bounds like that...

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what do you mean by classloader in java?

566


Explain the importance of finalize() method.

562


Can you call a method on a null object?

559


How do listeners work?

503


Why put method is idempotent?

456






What is stack example?

540


What is map in java?

514


What is an array in java?

636


What is the properties class?

557


Can we overload run() method in java?

593


What is final modifier?

556


Can an interface be defined inside a class?

515


Why do we need hashset in java?

495


Explain Basics of OOP Language in java

586


Can we use static class instead of singleton?

576