what is difference between Exception and Error?

Answers were Sorted based on User's Feedback



what is difference between Exception and Error?..

Answer / doshi rinal 9998099633

Error: Any departure from the expected behavior of the
system or program, which stops the working of the system is
an error. Exception:Any error or problem which one can
handle and continue to work normally.
An Exception can be caught and recovered:
ArrayIndexOutOfBoundsException means you tried to access a
position of an Array that does not exist - no big deal.
An Error is unrecoverable: OutOfMemoryError means that
the JVM has no more memory to store.
Java a compile time error is normally called an "error,"
while a runtime erroException can be handled and Error can
not be handled
When Error occur then our program stops and don't run but
If exception occur then nothing happening only try block
will be suspended and after that if any code is written
that will be executed properly means our system or program
work properly.
r is called an "exception."

Is This Answer Correct ?    13 Yes 10 No

what is difference between Exception and Error?..

Answer / suresh.g

Exception is handled at the run time.
Eg:- divide by zero.
Error is some thing is wrong in program.

Is This Answer Correct ?    4 Yes 1 No

what is difference between Exception and Error?..

Answer / s.devi

Error will not be controlled by the developer .
Eg:
Stack over flow,Memory over flow,Hard-disk failure,I/O
failure.


Exception will be controlled by the developer.

Is This Answer Correct ?    3 Yes 1 No

what is difference between Exception and Error?..

Answer / 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

what is difference between Exception and Error?..

Answer / pranab garai

Error occurs at runtime and cannot be recovered, Outofmemory
is one such example. Exceptions on the other hand are due
conditions which the application encounters such as
FileNotFound exception or IO exceptions

Is This Answer Correct ?    3 Yes 2 No

what is difference between Exception and Error?..

Answer / kapil gupta

Error is syntax error
where
Exception is logical error
and it can be handle by try-catch block

Is This Answer Correct ?    4 Yes 3 No

what is difference between Exception and Error?..

Answer / fareed

exception:bad input handled by compiler at runtime
error:comnpiler cant be handled and cannot be managed by
compiler

Is This Answer Correct ?    1 Yes 0 No

what is difference between Exception and Error?..

Answer / 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

what is difference between Exception and Error?..

Answer / kalvin

A runtime Error is an Exception

Is This Answer Correct ?    1 Yes 0 No

what is difference between Exception and Error?..

Answer / 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

More Core Java Interview Questions

What if I write static public void instead of public static void in java?

0 Answers   Winsol Solutions,


What are "methods" and "fields"?

0 Answers   Wipro,


What are the major advantages of internal iteration over external iteration?

0 Answers  


Implement two stacks using a single array.

0 Answers   Global Logic,


What is garbage collector?

0 Answers  






what is j2se

3 Answers  


What is math in java?

0 Answers  


Can a class have multiple superclasses?

0 Answers  


Explain importance of finally block in java?

0 Answers  


Is string a wrapper class?

0 Answers  


What is Co-Variant return type in method overriding?

1 Answers   RBS,


What will be the output of round(3.7) and ceil(3.7)?

0 Answers  


Categories