## Uses of Class
java.lang.Exception

- Packages that use Exception
  Package | Description
  --- | ---
  java.beans |
  java.io |
  java.lang |
  java.lang.annotation |
  java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
  java.net |
  java.nio.charset |
  java.security |
  java.text |
  java.util |
  java.util.concurrent | Utility classes commonly useful in concurrent programming.
  java.util.regex | Classes for matching character sequences against patterns specified by regular expressions.

- - ### Uses of Exception in java.beans

    Subclasses of Exception in java.beans
    Modifier and Type | Class and Description
    --- | ---
    `class` | `PropertyVetoException` A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.

  - ### Uses of Exception in java.io

    Subclasses of Exception in java.io
    Modifier and Type | Class and Description
    --- | ---
    `class` | `EOFException` Signals that an end of file or end of stream has been reached unexpectedly during input.
    `class` | `FileNotFoundException` Signals that an attempt to open the file denoted by a specified pathname has failed.
    `class` | `InterruptedIOException` Signals that an I/O operation has been interrupted.
    `class` | `InvalidClassException` Thrown when the Serialization runtime detects one of the following problems with a Class.
    `class` | `InvalidObjectException` Indicates that one or more deserialized objects failed validation tests.
    `class` | `IOException` Signals that an I/O exception of some sort has occurred.
    `class` | `NotActiveException` Thrown when serialization or deserialization is not active.
    `class` | `NotSerializableException` Thrown when an instance is required to have a Serializable interface.
    `class` | `ObjectStreamException` Superclass of all exceptions specific to Object Stream classes.
    `class` | `OptionalDataException` Exception indicating the failure of an object read operation due to unread primitive data, or the end of data belonging to a serialized object in the stream.
    `class` | `StreamCorruptedException` Thrown when control information that was read from an object stream violates internal consistency checks.
    `class` | `SyncFailedException` Signals that a sync operation has failed.
    `class` | `UnsupportedEncodingException` The Character Encoding is not supported.
    `class` | `UTFDataFormatException` Signals that a malformed string in modified UTF-8 format has been read in a data input stream or by any class that implements the data input interface.
    `class` | `WriteAbortedException` Signals that one of the ObjectStreamExceptions was thrown during a write operation.

    Fields in java.io declared as Exception
    Modifier and Type | Field and Description
    --- | ---
    `Exception` | WriteAbortedException.`detail` Exception that was caught while writing the ObjectStream.

    Constructors in java.io with parameters of type Exception
    Constructor and Description
    `WriteAbortedException(String s, Exception ex)` Constructs a WriteAbortedException with a string describing the exception and the exception causing the abort.

  - ### Uses of Exception in java.lang

    Subclasses of Exception in java.lang
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ArithmeticException` Thrown when an exceptional arithmetic condition has occurred.
    `class` | `ArrayIndexOutOfBoundsException` Thrown to indicate that an array has been accessed with an illegal index.
    `class` | `ArrayStoreException` Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
    `class` | `ClassCastException` Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
    `class` | `ClassNotFoundException` Thrown when an application tries to load in a class through its string name using: The `forName` method in class `Class`.
    `class` | `CloneNotSupportedException` Thrown to indicate that the `clone` method in class `Object` has been called to clone an object, but that the object's class does not implement the `Cloneable` interface.
    `class` | `IllegalAccessException` An IllegalAccessException is thrown when an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, but the currently executing method does not have access to the definition of the specified class, field, method or constructor.
    `class` | `IllegalArgumentException` Thrown to indicate that a method has been passed an illegal or inappropriate argument.
    `class` | `IllegalMonitorStateException` Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
    `class` | `IllegalStateException` Signals that a method has been invoked at an illegal or inappropriate time.
    `class` | `IndexOutOfBoundsException` Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
    `class` | `InstantiationException` Thrown when an application tries to create an instance of a class using the `newInstance` method in class `Class`, but the specified class object cannot be instantiated.
    `class` | `InterruptedException` Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
    `class` | `NegativeArraySizeException` Thrown if an application tries to create an array with negative size.
    `class` | `NoSuchMethodException` Thrown when a particular method cannot be found.
    `class` | `NullPointerException` Thrown when an application attempts to use `null` in a case where an object is required.
    `class` | `NumberFormatException` Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
    `class` | `ReflectiveOperationException` Common superclass of exceptions thrown by reflective operations in core reflection.
    `class` | `RuntimeException` `RuntimeException` is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
    `class` | `SecurityException` Thrown by the security manager to indicate a security violation.
    `class` | `StringIndexOutOfBoundsException` Thrown by `String` methods to indicate that an index is either negative or greater than the size of the string.
    `class` | `UnsupportedOperationException` Thrown to indicate that the requested operation is not supported.

    Methods in java.lang that throw Exception
    Modifier and Type | Method and Description
    --- | ---
    `void` | AutoCloseable.`close()` Closes this resource, relinquishing any underlying resources.

  - ### Uses of Exception in java.lang.annotation

    Subclasses of Exception in java.lang.annotation
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AnnotationTypeMismatchException` Thrown to indicate that a program has attempted to access an element of an annotation whose type has changed after the annotation was compiled (or serialized).
    `class` | `IncompleteAnnotationException` Thrown to indicate that a program has attempted to access an element of an annotation type that was added to the annotation type definition after the annotation was compiled (or serialized).

  - ### Uses of Exception in java.lang.reflect

    Subclasses of Exception in java.lang.reflect
    Modifier and Type | Class and Description
    --- | ---
    `class` | `InvocationTargetException` InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
    `class` | `UndeclaredThrowableException` Thrown by a method invocation on a proxy instance if its invocation handler's `invoke` method throws a checked exception (a `Throwable` that is not assignable to `RuntimeException` or `Error`) that is not assignable to any of the exception types declared in the `throws` clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.

  - ### Uses of Exception in java.net

    Subclasses of Exception in java.net
    Modifier and Type | Class and Description
    --- | ---
    `class` | `MalformedURLException` Thrown to indicate that a malformed URL has occurred.
    `class` | `URISyntaxException` Checked exception thrown to indicate that a string could not be parsed as a URI reference.

  - ### Uses of Exception in java.nio.charset

    Subclasses of Exception in java.nio.charset
    Modifier and Type | Class and Description
    --- | ---
    `class` | `IllegalCharsetNameException` Unchecked exception thrown when a string that is not a legal charset name is used as such.
    `class` | `UnsupportedCharsetException` Unchecked exception thrown when no support is available for a requested charset.

  - ### Uses of Exception in java.security

    Subclasses of Exception in java.security
    Modifier and Type | Class and Description
    --- | ---
    `class` | `PrivilegedActionException` This exception is thrown by `doPrivileged(PrivilegedExceptionAction)` and `doPrivileged(PrivilegedExceptionAction, AccessControlContext context)` to indicate that the action being performed threw a checked exception.

    Methods in java.security that return Exception
    Modifier and Type | Method and Description
    --- | ---
    `Exception` | PrivilegedActionException.`getException()` Returns the exception thrown by the privileged computation that resulted in this `PrivilegedActionException`.

    Methods in java.security that throw Exception
    Modifier and Type | Method and Description
    --- | ---
    `T` | PrivilegedExceptionAction.`run()` Performs the computation.

    Constructors in java.security with parameters of type Exception
    Constructor and Description
    `PrivilegedActionException(Exception exception)` Constructs a new PrivilegedActionException "wrapping" the specific Exception.

  - ### Uses of Exception in java.text

    Subclasses of Exception in java.text
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ParseException` Signals that an error has been reached unexpectedly while parsing.

  - ### Uses of Exception in java.util

    Subclasses of Exception in java.util
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ConcurrentModificationException` This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.
    `class` | `EmptyStackException` Thrown by methods in the `Stack` class to indicate that the stack is empty.
    `class` | `MissingResourceException` Signals that a resource is missing.
    `class` | `NoSuchElementException` Thrown by the `nextElement` method of an `Enumeration` to indicate that there are no more elements in the enumeration.

  - ### Uses of Exception in java.util.concurrent

    Subclasses of Exception in java.util.concurrent
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BrokenBarrierException` Exception thrown when a thread tries to wait upon a barrier that is in a broken state, or which enters the broken state while the thread is waiting.
    `class` | `CancellationException` Exception indicating that the result of a value-producing task, such as a `FutureTask`, cannot be retrieved because the task was cancelled.
    `class` | `ExecutionException` Exception thrown when attempting to retrieve the result of a task that aborted by throwing an exception.
    `class` | `RejectedExecutionException` Exception thrown by an `Executor` when a task cannot be accepted for execution.
    `class` | `TimeoutException` Exception thrown when a blocking operation times out.

    Methods in java.util.concurrent that throw Exception
    Modifier and Type | Method and Description
    --- | ---
    `V` | Callable.`call()` Computes a result, or throws an exception if unable to do so.

  - ### Uses of Exception in java.util.regex

    Subclasses of Exception in java.util.regex
    Modifier and Type | Class and Description
    --- | ---
    `class` | `PatternSyntaxException` Unchecked exception thrown to indicate a syntax error in a regular-expression pattern.

Copyright © 2025 API Design. All Rights Reserved.