What is the difference between error and exception and
explain in simple words not whatever is given in the book.
Answer Posted / muffy.jad@gmail.com
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
| Is This Answer Correct ? | 26 Yes | 1 No |
Post New Answer View All Answers
What is variable in java?
Can we instantiate interface in java?
Can you call a method on a null object?
What is the difference between class forname and new?
How do you check if a character in a string is a digit or letter?
What is valid keyword in java?
Can we execute java program without main method?
Difference between notify() method and notifyall() method in java?
What is the biggest integer?
how to split string in java?
What is anti pattern in programming?
What is difference between printf and scanf?
Is java owned by oracle?
What is void in java?
What is difference between char array and string?