Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 is static keyword in java?

0 Answers  


How do you use substring in java?

0 Answers  


Explain hashset and its features?

0 Answers  


Convert a BST into a DLL and DLL to BST in place.

0 Answers   Amazon,


What are the 6 functions?

0 Answers  






Memory management in JAVA

3 Answers   Tech Mahindra, Wipro,


Why java is object oriented?

0 Answers  


What is the difference between Checked and Unchecked exception? Give some examples

2 Answers   Ness Technologies,


How many bits are in a sentence?

0 Answers  


What is better - 'bit-shift a value' or 'multiply by 2'?

0 Answers   DELL,


What is a class variable?

0 Answers  


What is the return type of readLine() when end of a file is reached?

2 Answers  






Categories