Exception handling – try catch

One of the ways of handling exception in java is by using Try-catch block. Syntax for using try & catch try{     Normal statement(s) } catch (exceptiontype name){     Exception handling statement(s) } try{ Normal statement(s) } catch (exceptiontype name){ Exception handling statement(s) } We place normal code that might throw an exception […]

Share this article on

Unchecked Exception

Unchecked Exceptions are not checked by compiler during compile time, we will not be forced to handle it, but it is always best to handle the exceptions. If we don’t handle unchecked exception then compilation error will not come. All unchecked exceptions are subclasses of RuntimeException class. Generally, these exceptions occur due to the wrong […]

Share this article on
< Previous Next >