Sunday, January 28, 2007

the difference between ‘Exception’ and ‘error’ in java?

Exception and Error are the subclasses of the Throwable class. Exception class is used for exceptional conditions that user program should catch. With exception class we can subclass to create our own custom exception.

Error defines exceptions that are not excepted to be caught by you program. Example is Stack Overflow.


SOURCE : www.referjava.com

No comments: