Java - Java Exceptions and their description

ExceptionDescription
ArithmeticExceptionArithmetic error, such as divide-by-zero.
ArrayIndexOutOfBoundsExceptionArray index is out-of-bounds.
ArrayStoreExceptionAssignment to an array element of an incompatible type.
ClassCastExceptionInvalid cast.
IllegalArgumentExceptionIllegal argument used to invoke a method.
IllegalMonitorStateExceptionIllegal monitor operation, such as waiting on an unlocked thread.
IllegalStateExceptionEnvironment or application is in incorrect state.
IllegalThreadStateExceptionRequested operation not compatible with current thread state.
IndexOutOfBoundsExceptionSome type of index is out-of-bounds.
NegativeArraySizeExceptionArray created with a negative size.
NullPointerExceptionInvalid use of a null reference.
NumberFormatExceptionInvalid conversion of a string to a numeric format.
SecurityExceptionAttempt to violate security.
StringIndexOutOfBoundsAttempt to index outside the bounds of a string.
UnsupportedOperationExceptionAn unsupported operation was encountered.
ClassNotFoundExceptionClass not found.
CloneNotSupportedExceptionAttempt to clone an object that does not implement the Cloneable interface.
IllegalAccessExceptionAccess to a class is denied.
InstantiationExceptionAttempt to create an object of an abstract class or interface.
InterruptedExceptionOne thread has been interrupted by another thread.
NoSuchFieldExceptionA requested field does not exist.
NoSuchMethodExceptionA requested method does not exist.


200 Core Java Interview Questions and Answers