throw is used to throw an exception object explicitly. It can take only one argument and that will be an exception object. Exception object to be thrown can be of either checked or unchecked exception type.
* This program used to show the use of throw exception.
* This method is used to divide two integers.
Next Topic: throws in java with example.
Previous Topic: Finally in java with example.