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
how does multithreading take place on a computer with a single cpu? : Java thread
What is overloading and overriding in java?
explain the concept of virtual method invocation in polymorphism in detail?
Is null == null in java?
How many types of interfaces are there?
What is mean by exception?
Is java a pure object oriented language?
What is math exp in java?
Can size_t be negative?
Explain treeset?
How do weakhashmap works?
What's a method in programming?
What does it mean that strings are immutable?
What about interrupt() method of thread class ?
What state does a thread enter when it terminates its processing in java programming?