Java:Exceptions
lastmod 2018-08-17created 2015-11-181 edits
An explanation of the types of Exception in JAVA.
- ArithmeticException: arithmetic exception, e.g. division by 0.
- ClassCastException: thrown when converting an object to a type it cannot be converted to, e.g. casting between classes.
- NullPointerException: thrown when a reference refers to null.
- ArrayIndexOutOfBoundsException: when the bounds of an array are exceeded.
- OutOfMemoryException: thrown when memory runs out.
- IOException: an I/O operation failed or was interrupted.
- NumberFormatException: thrown when converting a string to a numeric type that does not match the number the string represents.
- NegativeArraySizeException: when the size of an array is negative (-).
- ArrayStoreException: when the value assigned to an array is invalid.
- IllegalArgumentException: when an invalid value is passed to a parameter.
- IllegalStateException : exception for an illegal state / error raised when a state transition happens in an invalid state.
- SecurityException: security exception.
- ConcurrentModificationException: thrown when concurrent modification of an object is detected where it is not permitted.
- UnsupportedOperationException: thrown when an object does not support the method.