Exceptions: Specifying the Exceptions Thrown by a Method
Specifying the Exceptions Thrown by a Method
To specify that method can throw an exception, add a throws clause to the method declaration for the method. The throws clause comprises the throws keyword followed by a comma-separated list of all the exceptions thrown by that method. The clause goes after the method name and argument list and before the brace that defines the scope of the method.
Semantic portal