throws

The throws keyword is used in a method declaration to list any exceptions not derived from Error or RuntimeException that a method can throw. (Exceptions derived from type RuntimeException are typically avoidable. Exceptions derived from type Error are usually related to serious system problems; thus, little can be done about them.)

The following example shows a typical method declaration using the throws keyword:

public int someMethod( int argument ) throws Exception1, Exception2
{
    // This method may contain a try/catch block
    // for detecting and possibly handling any caught
    // exceptions.

}