Answer Posted / 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 |
Post New Answer View All Answers
Why do we need variables?
What are the three types of design patterns?
What if I write static public void instead of public static void in java?
What are the four pillars of java?
Can we override private method?
What is a return in java?
What is static keyword?
What is a generic data type?
Can an interface be final?
What is the history of java?
What is a concrete classes? Is Java object class is concrete class?
Is intellij better than eclipse?
What is functional interface in javatpoint?
What is meant by final class?
Why we do exception handling in java and how many types of exceptions are there?