Friday, July 6, 2012

The detailes study of Exception and Errors


The Exception and errors are always problematic in Java.At time if we face such errors we are unable to repair and out total effort is wasted because of some unknown errors occures at runtime.Let us discuss
about these irretating exception and errors in details.


Difference


The Error is occur at run time and can't abe repair at time.Most of the time the errors occurs at time and its JVM erros.It can't be repairable for example out of memory Error


The exception occur because of the user's invalid input.But it possible to recover immediately.These exception are compile time exception.For example File not Found Exception is thrown because of file path has not found means invalid path has given. Another one NullPointerexception means some place in the class expecting some value but value not present in the method so it throws null pointer exception.


Out of memory Exception: 


This exception is thrown when the heap memory is full.


StackoverFlow exception


This exception we get once stack is full of occupied.

No comments:

Post a Comment