What is exception and error? and what is the difference
between them?
Answer Posted / janet
The exception class defines mild error conditions that your
program encounters.
Ex: Arithmetic Exception,FileNotFound Exception
Exception can occur when
--> Try to open the file,which does not exist
--> the network connection is disrupted.
--> operands being manipulated are out of prescribed
ranges.
--> the class file you are interested in loading is
missing.
The error class defines serious error conditions that
you should not attempt to recover from .in most cases it is
advisable to let the program terminate when such an error
is encountered.
Ex. Running out of memory error,stack overflow error.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What are the two ways of implementing multi-threading in java?
Difference between object and reference?
If a method is declared as protected, where may the method be accessed?
Java.util.regex consists of which classes?
What is included in core java?
Which is bigger double or float?
How to perform bubble sort in java?
What is difference between final and immutable?
Explain the difference between jvm and jre?
Why charat is used in java?
What are namespaces in java?
How to reverse string in java?
What are the library functions in java?
Why set is used in java?
Why webdriver is an interface?