what is difference between Exception and Error?

Answer Posted / vikas deshmukh

both inherit from Throwable, some differences are,

Exceptions:

1)It can be checked or unchecked
2)It indicate an error caused by the programmer
3)It Should be handled at the application level

Errors:

1)Errors are always unchecked
2)Usually indicate a system error or a problem with a low-level resource
3)It should be handled at the system level, if possible

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why an outer class cannot be declared as private?

3602


Define how objects are stored in java?

557


How will you call an Applet using Java Script Function?

534


What do you mean by of string::valueof expression in java 8?

531


Can a variable be local and static at the same time?

530






What are the different types of inner classes?

522


Name component subclasses that support painting in java programming?

621


What steps are taken when the OS shifts from one-thread execution to another?

890


Difference between current previous versions of Java?

547


Name few java 8 annotations ?

550


How does java pattern compile work?

535


what are the states associated in the thread? : Java thread

577


Can constructor be static or final?

642


What is callablestatement? How you can call stored procedure to pass in parameter?

535


How many bits is size_t?

535