what is difference between Exception and Error?

Answer Posted / mukesh kumar

Exceptions are abnormal condition that occur at run time and
it can be handle through try catch block.
Errors are those abnormal condition that occur at compile
time and can not be handle. Error terminates the program
whereas exception does not terminate program directly, it
provide chance to handle that abnormal condition.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between overloading and overriding in java?

521


What is the r character?

580


How to sort numbers in java without array?

519


Which class is the superclass for all the classes?

525


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

674






which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?

9173


Is java 11 paid version?

502


When do you get classcastexception?

542


What is string in java with example?

478


How java enabled high performance?

577


What is the difference between public, private, protected, and friend access?

566


Is double bigger than float?

531


What does method mean?

504


Can we call virtual funciton in a constructor ?

1764


Explain different types of thread priorities ?

612