Unchecked exceptions in java
All subclasses of RuntimeException are called unchecked exceptions. These are unchecked exceptions
because compiler does not checks if a method handles or throws exceptions.
Program compiles even if we do not catch the exception or throws the exception.
If an exception occurs in the program, program terminates . It is difficult to handle these exceptions
because there may be many places causing exceptions.
Example : 1) Arithmetic Exception
3) ArrayIndexOutOfBoundsException
4) ClassCastException
5) IndexOutOfBoundException
6) NullPointerException
7) NumberFormatException
8) StringIndexOutOfBounds
9) UnsupportedOperationException
What are unchecked exceptions in java?
by
Tags:
Leave a Reply