bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Errors and Exception Types

Flash cards

Review the key moves

1/3
Core idea

What is the main idea behind Java Errors and Exception Types?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

Errors and Exception Types

The table below shows a list of common Error and Exception types in Java:

Error/ExceptionDescription
ArithmeticErrorOccurs when a numeric calculation goes wrong
ArrayIndexOutOfBoundsExceptionOccurs when trying to access an index number that does not exist in an array
ClassFormatErrorOccurs when a class file cannot be accessed
ClassNotFoundExceptionOccurs when trying to access a class that does not exist
ConcurrentModificationExceptionOccurs when an element is added or removed from iterables
FileNotFoundExceptionOccurs when a file cannot be accessed
IncompatibleClassChangeErrorOccurs when there's been a change in a base class after a child class has already been initialized
InputMismatchExceptionOccurs when entering wrong input (e.g. text in a numerical input)
InterruptedExceptionOccurs when a Thread is interrupted while waiting/sleeping
InvalidClassExceptionOccurs when the Serialization runtime observes a problem with a class
IOExceptionOccurs when an input or output operation fails
NegativeArraySizeExceptionOccurs when trying to create an array with negative size
NoClassDefFoundErrorOccurs when the class is not found at runtime
NoSuchFieldExceptionOccurs when trying to access a class field/variable that does not exist
NoSuchMethodExceptionOccurs when trying to access a class method that does not exist
NullPointerExceptionOccurs when trying to access an object referece that is null
NumberFormatExceptionOccurs when it is not possible to convert a specified string to a numeric type
RuntimeExceptionOccurs when an exception occurs at runtime
StringIndexOutOfBoundsExceptionOccurs when trying to access a character in a String that does not exist
TypeNotPresentExceptionOccurs when a type cannot be found
IllegalArgumentExceptionOccurs when when an illegal argument is passed to a method
IllegalStateExceptionOccurs when when a method is called at an illegal time

Previous

Java System Methods

Next chapter

Java Examples

Start with Java Interview Questions