Runtime exceptions are need not be handled by the programs. Generally RuntimeExceptions are exceptions that can be prevented programmatically.E.g NullPointerException, ArrayIndexOutOfBoundException. If we check for null value before calling any method, NullPointerException would never occur. These kind of exceptions should never be handled because that is not good practice. Java has 49 Runtime exceptions defined in its API. These all the exceptions extend the super class java.lang.RuntimeException. The below list is all the RuntimeExceptions as of Java 7 release.
- AnnotationTypeMismatchException
- ArithmeticException
- ArrayStoreException
- BufferOverflowException
- BufferUnderflowException
- CannotRedoException
- CannotUndoException
- ClassCastException
- CMMException
- ConcurrentModificationException
- DataBindingException
- DOMException
- EmptyStackException
- EnumConstantNotPresentException
- EventException
- FileSystemAlreadyExistsException
- FileSystemNotFoundException
- IllegalArgumentException
- IllegalMonitorStateException
- IllegalPathStateException
- IllegalStateException
- IllformedLocaleException
- ImagingOpException
- IncompleteAnnotationException
- IndexOutOfBoundsException
- JMRuntimeException
- LSException
- MalformedParameterizedTypeException
- MirroredTypesException
- MissingResourceException
- NegativeArraySizeException
- NoSuchElementException
- NoSuchMechanismException
- NullPointerException
- ProfileDataException
- ProviderException
- ProviderNotFoundException
- RasterFormatException
- RejectedExecutionException
- SecurityException
- SystemException
- TypeConstraintException
- TypeNotPresentException
- UndeclaredThrowableException
- UnknownEntityException
- UnmodifiableSetException
- UnsupportedOperationException,
- WebServiceException
- WrongMethodTypeException