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

What is the definition of tree ?

585


Why do we use predicate in java?

553


Is space a string in java?

508


Can java list be null?

545


Can an interface have a class?

561






Can static methods access instance variables in java?

569


What are the restriction imposed on a static method or a static block of code?

591


When do I need to use reflection feature in java?

622


Give the hierarchy of inputstream and outputstream classes.

608


What is ternary operator? Give an example.

595


What is the list interface in java programming?

580


What is difference between wait and notify in java?

541


Write a program to print the pattern given below

493


Why do we need singleton class?

547


What does localhost mean?

494