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


Please Help Members By Posting Answers For Below Questions

How many characters is 16 bytes?

531


What is java and its types?

547


How many types of threads are there in java?

497


What is concurrent hashmap and its features?

511


What is the use of put method?

510






A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

533


What does exclamation mean in java?

563


What are the ways in which a thread can enter the waiting state?

500


Why is a string immutable?

533


What is number data type?

526


What is an arraylist in java?

507


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

596


What is incompatible types in java?

527


What is a null check?

531


explain what is transient variable in java?

612