1.

What Is The Difference Between Error And Exception?

Answer»

Exception - An Exception INDICATES that a PROBLEM has OCCURRED, but it is not a serious system problem. The USER programs you write will throw and catch Exceptions.

Error - It DEFINES exceptions that are not expected to be caught by your program. Exceptions of type Error are used by the Java run-time system to indicate errors having to do with the run-time environment, itself.

Examples of error are StackOverflowError, OutOfMemoryError etc.

Exception - An Exception indicates that a problem has occurred, but it is not a serious system problem. The user programs you write will throw and catch Exceptions.

Error - It defines exceptions that are not expected to be caught by your program. Exceptions of type Error are used by the Java run-time system to indicate errors having to do with the run-time environment, itself.

Examples of error are StackOverflowError, OutOfMemoryError etc.



Discussion

No Comment Found