what is difference between Exception and Error?

Answer Posted / shahnawaz ali shah

Exception is coverable
Error is uncoverable

Exception can be handled
and Error can not be handled

Exceptio is an run time error when an abnormal condition is
occured the jvm detect it and make the object of that
abnormal condition and throws it to its own class and that
object is catched by catched block and catch block handled it

Error is the compile time error not runtime and it is not
covered it is only fixed by a programer.

Note
When Error occur then our programe stops and donot run

but If exception occur then nothing happining only try block
will be suspended and after that if any code is written that
will be executed properly means our system or programe work
properly.

Is This Answer Correct ?    116 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is final different from finally and finalize?

486


What are the advantages of java over cpp?

543


What is difference between equal and == in java?

513


can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread

528


Difference between final and effectively final ? Why is effectively final even required ?

544






Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.

604


What is e java?

552


How do you use parseint in java?

506


Explain garbage collection in java?

537


Explain the scope or life time of class variables or static variables?

506


Are private methods final?

472


In the below example, what will be the output?

585


What happens if constructor is private?

552


What is java util?

525


What is a dot notation?

542