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 is the difference between menuitem and checkboxmenu item?
What is rule of accessibility in java?
Can constructor be static or final?
What is use of set in java?
Explain notifyall() method of object class ?
What is autoboxing and unboxing?
What is a static method in java?
Explain the difference between string, stringbuffer and stringbuilder in java?
Why string is not thread safe?
How do you identify if jvm is 32-bit or 64-bit from java program?
How we can generate random numbers in java?
What is a nested list?
What is an abstract class and what is it’s purpose?
What is the use of set in java?
How will you reverse a singly-link list?