Java

Topic: Exceptions

What are Checked Exceptions and Unchecked Exceptions?

The types of exceptions that need not be included in a methods throws list are called Unchecked Exceptions. 
ArithmeticException 
ArrayIndexOutOfBoundsException 
ClassCastException 
IndexOutOfBoundsException 
IllegalStateException 
NullPointerException 
SecurityException

The types of exceptions that must be included in a methods throws list if that method can generate one of these exceptions and does not handle it itself are called Checked Exceptions. ClassNotFoundException 
CloneNotSupportedException 
IllegalAccessException 
InstantiationException 
InterruptedException 
NoSuchFieldException 
NoSuchMethodException

Browse random answers: