what is difference between Exception and Error?

Answer Posted / kannan

Error is a broader term which could be used to define all
not-so-expected behaviour of the program in
which 'Exception' is of one kind. Like many answered here,
exception is an unexpected behaviour at run time which
could cause the processor to rise the exception and can be
captured/handled in the program and further it could be
thrown to higher level code.

Compiletime error:
The other types of errors could be compile time errors
mainly captured by the compiler based on not-in-agreement
with the specific language specification.

Program logic error (function):
This type of error is left in the program after cleaning
compile time error and may or may not cause an exception.
This means the program could produce a wrond result.

Abnormal Operation error:
This type of error is produced by operating the program in
not so expected way. This means, under normal operating
condition the program will produce right results but could
produce wrong results if the operating procedure is not
followed. This is important aspect to fix in mission
critical applications.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does anyone still use java?

572


Why java is object oriented?

573


What are the main concepts of oops in java?

581


can any body body expalin best definitions & best real time exaples for opps concepts.

1822


Which object oriented concept is achieved by using overloading and overriding?

535






Why do we use return statement?

528


What is the difference between an if statement and a switch statement?

631


When throws keyword is used?

572


What is contractor means and methods?

543


Give an example of use of pointers in java class.

554


What is a arraylist in java?

543


What is a generic data type?

558


What are the methods available in a class?

567


Why is singleton class used?

507


How do I find and replace in word?

523