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 do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread
What are functions in java?
Can a final method be overloaded?
Why does java not allow multiple public classes in a java file ?
What are operators and its types?
Is java 11 paid version?
What are exception handling keywords in java?
Is logger a singleton?
What is unsigned char?
What is the byte range?
How to change the priority of thread or how to set the priority of thread?
What do you mean by static variable?
What is the difference between compare and compareto in java?
What is the collections api in java programming?
What is the difference between throw and throws keywords?