Difference between error and exception
Answers were Sorted based on User's Feedback
Answer / rams
The mistakes in the syntax are resulted as errors
the mistakes in the logic of a program resulted as exceptions.
| Is This Answer Correct ? | 16 Yes | 1 No |
Answer / modi
An error is an irrecoverable condition occurring at runtime.
Such as OutOfMemory error. These JVM errors and you can not
repair them at runtime. While exceptions are conditions that
occur because of bad input etc. e.g. FileNotFoundException
will be thrown if the specified file does not exist. Or a
NullPointerException will take place if you try using a null
reference. In most of the cases it is possible to recover
from an exception (probably by giving user a feedback for
entering proper values etc.).
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / chitraraman
Error in java means the mistake done buy the programmer
logically or syntatically.
Exception is an error thrown by java impllctly like
IOException,Array out of bound Exception
| Is This Answer Correct ? | 2 Yes | 2 No |
Why java is used everywhere?
Variable of the boolean type is automatically initialized as?
What is break and continue statement?
When do we use synchronized methods in java?
Why is java architectural neutral?
Is it compulsory to have atleast one abstract method in abstract class?
What is the similarity between dynamic binding and linking?
What is the equal sign?
How many bytes is a char in java?
Is it possible to declare abstract class as final?What happens if we do so?
What is multithreading and its advantages?
What is the Layout for ToolBar?